W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2003

Re: MS-FO-LC1-017: cast untypedAtomic to other type with arithmetic and compare ops.

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 1 Jul 2003 09:53:18 +0100
Message-ID: <8478998934.20030701095318@jenitennison.com>
To: "Michael Rys" <mrys@microsoft.com>
CC: public-qt-comments@w3.org

Michael,

> Why don't we cast untypedAtomic to other type instead of directly to
> xs:double and use xs:double only as fallback for arithmetic and
> compare?
>
> This would mean that an expression such as xs:untypedAtomic(1)+1
> results in an integer(2) instead of a double(2.0e0) as it does now.
 
The problem is that it would also mean that xs:untypedAtomic('2.5')+1
resulted in a dynamic error, since the untyped atomic value '2.5'
isn't a legal lexical representation of xs:integer. I think that this
would be disconcerting.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Tuesday, 1 July 2003 04:53:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:13 UTC