W3C home > Mailing lists > Public > public-webont-comments@w3.org > July 2008

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

From: Pete Cordell <petexmldev@codalogic.com>
Date: Wed, 9 Jul 2008 10:12:41 +0100
Message-ID: <005b01c8e1a3$f2268a30$ea00a8c0@Codalogic>
To: "Michael Kay" <mike@saxonica.com>, <paul@sparrow-hawk.org>, "'Alan Ruttenberg'" <alanruttenberg@gmail.com>
Cc: "'Dave Peterson'" <davep@iit.edu>, "'Rob Shearer'" <rob.shearer@comlab.ox.ac.uk>, <public-webont-comments@w3.org>, <public-owl-wg@w3.org>, <www-xml-schema-comments@w3.org>

- Original Message From: "Michael Kay"

> At the same time it's true that most modern languages do the same as
> Schema+QT: they treat integer, double and float as separate primitive
> types
> with no hierarchic relationship, and then define operators such as "=" and
> "+" to operate across a value space that is effectively the union of these
> types.

I'll admit that most of this is going over my head, but... don't most
programming languages promote one type into another to do cross-type
comparisons?  For example int -> float (probably double in C) in order to
compare an int with a float, and float to double to compare floats and

Is there any mileage in XML schema defining how the value of one type can be
promoted into a value of another in order to do the comparisons looked for?
That way the types can remain largely disjoint, but the various operations
can be provided.

Apologies if this is out of place.  I'll get back to my grease gun now!


Pete Cordell
For XML C++ data binding visit http://www.codalogic.com/lmx/
Received on Wednesday, 9 July 2008 09:13:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:09:30 UTC