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

- 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
doubles.

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!

Regards,

Pete Cordell
Codalogic
For XML C++ data binding visit http://www.codalogic.com/lmx/

Received on Wednesday, 9 July 2008 09:13:28 UTC