half and quad

Chad J gamerChad at _spamIsBad_gmail.com
Sat Oct 13 05:30:47 PDT 2007


Janice Caron wrote:
> On 10/11/07, Olifant <olifant at gmail.com> wrote:
> 
> I've always thought the names we have for built-in types are (mostly)
> horrible. ...
[snip]
> 
> I'd vote for more obvious names any day:
> int8, int16, int32, int64, int128...
> uint8, uint16, uint32, uint64, uint128...
> real16, real32, real64, real80, real128...
> 
> with "int", "uint" and "real" being aliases for whatever type is
> "machine native".

I agree, though I'd rather "int" be a big integer type that really does 
handle all integers.  Perhaps something like "word" for the machine 
sized number.

Rationals would be cool too, though I doubt they are worthy of language 
built-in-edness.  If your language can mimic built in types perfectly 
from a library implementation, then the doors are open for frac8, 
frac16, frac32, etc.  "frac" for fraction, since I'm not sure how I feel 
about "rat" :)  It seems that D is headed in this direction of 
user-defined types that can mimic builtins, which is quite awesome.



More information about the Digitalmars-d mailing list