RE: ISSUE-126 (Revisit Datatypes): A new proposal for the real <-> float <-> double conundrum

At 7:54 PM +0100 2008-07-08, Michael Kay wrote:

>(b) it claims the existence of a "principle that if a string
>maps to a given value in a particular type then it should map to the same
>in all supertypes". I don't see that principle as being in any way
>fundamental, and I certainly don't see it as "fundamental to subtyping in
>programming languages". It's also violated within XML Schema itself - " xx "
>as an instance of xs:token maps to a different value from " xx " as an

Not so.  ' xx ' is not in the lexical space of token.  The literal that
is considered for lexical space membership is the one that is obtained
by whitespace processing.

Whether this is good or bad is a matter of opinion, I suppose.  But that's
the way whitespace works.  (Took me a few years to really internalize
this, myself.)

Whether the primciples themselves are good is a matter of opinion.
But I hope we don't change things from one version of the spec to the
next without serious thought.  (E.g., there was serious thought given
to the decision to allow equality to differ from identity, to have
two zeros in float and double, and to retain timezone information in
the date/time datatypes.)
Dave Peterson

Received on Wednesday, 9 July 2008 02:59:12 UTC