Re: xml.com piece on XML Schema datatypes (no rationals :-{)

At 05:51 PM 8/1/02 -0500, Dan Connolly wrote:
>On Thu, 2002-08-01 at 16:29, Graham Klyne wrote:
>[...]
>
> > My own particular pet peeve with XML schema datatypes is the lack of a
> > rational number primitive (my comment was submitted to, considered and
> > rejected by XML schema WG).
>
>Sorry about that; I agree, but I didn't have the energy to fight harder.
>I did put the HTTP-NG type system on the table, which had a nice
>design for rationals (hm... reviewing, it seems to be fixed-point,
>not rationals... anyway...). Sigh.

Well, I share similar blame ... I had an opportunity to register dissent 
but failed to do so.

> >  To my view, this should be the concept from
> > which all other numeric data types are derived, by restriction.  (All
> > schemes for representing numbers in a computer that I'm aware of represent
> > rational numbers only.)
>
>Well, floating point numbers are not restrictions of rationals.
>Floating point multiplication and addition are not, strictly
>speaking, associative.

Good point.  I was only considering representation and comparison.

I still think that rationals would be a good basis for integers and fixed 
and some other numeric values...

>Aha! there it is:
>
>                 Floating-point datatypes are not real datatypes
>                         Mark Reinhold <mr@eng.sun.com>
>                                 5 October 1999
>http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JanMar/0130.html

... but I agree there's a compelling case to treat float and double separately.

(An alternative might have been to have only integers, and compose 
rationals, -- this is roughly what XML schema WG said to me -- but it's not 
clear to me how one would have a standard definition of comparison -- which 
question the WG did not answer.)

Anyway, I guess that's all water under the bridge, and we have to get on 
with life?

#g


-------------------
Graham Klyne
<GK@NineByNine.org>

Received on Friday, 2 August 2002 07:44:30 UTC