- From: Michael Rys <mrys@microsoft.com>
- Date: Wed, 10 Nov 2004 22:58:50 -0800
- To: "Paul J. Lucas" <plucas@bea.com>, "Michael Kay" <mhk@mhk.me.uk>
- Cc: <public-qt-comments@w3.org>
Note that numeric in our specification is not really a type at all but a notational short-hand. Best regards Michael > -----Original Message----- > From: public-qt-comments-request@w3.org [mailto:public-qt-comments- > request@w3.org] On Behalf Of Paul J. Lucas > Sent: Wednesday, November 10, 2004 6:08 PM > To: Michael Kay > Cc: public-qt-comments@w3.org > Subject: RE: Is xdt:anyAtomicType itself atomic? > > > On Thu, 11 Nov 2004, Michael Kay wrote: > > > What practical difference does it actually make whether > xdt:anyAtomicType is > > an atomic type or not? > > The issue arrose indirectly during the implementation of our > XQuery engine. As part of our type system (which does full > structural typing in addition to named typing), we've defined a > "convenience" type to the developer: > > numeric = xs:integer | xs:float | xs:double > > I'm not clear on the exact details, but a developer who does > our run time presumeably has the type of an expression set to > numeric for things like addition, subtraction, etc. Of course > at runtime, there are actual values that also have a type. The > developer wanted to be able to ensure that an argument to > something that expects an atomic type really is atomic. A > particular value had the type numeric, so he asked: > > T.isAtomic() > > He was surprised that it returned false. I generalized his > case: if numeric should be considered atomic, then so should > anyAtomicType. Hence my question to the committee. > > We currently have anyAtomicType defined as a union and, as far > as we can tell, it makes no difference... except in the case at > hand. I pointed out that he can get what he wants by instead > doing: > > T <= anyAtomicType > > So the issue may (?) be moot. > > - Paul >
Received on Thursday, 11 November 2004 06:58:56 UTC