[xquery-talk] operations on derived numeric type

Michael Kay mike at saxonica.com
Mon Sep 2 06:29:43 PDT 2013


On 2 Sep 2013, at 13:15, Benito van der Zander wrote:

> 
> 
> So taking this further:
> 
> Even xs:decimal(4.0) instance of xs:int, might be true, since the int is still a decimal.
> 

I have certainly argued for that interpretation on occasions, though I found that for practical reasons it's best for casts and constructors to always return the specific type requested. (Otherwise people with "instance of" or "typeswitch" constructions that take an unexpected branch get upset.)

Michael Kay
Saxonica


More information about the talk mailing list