half and quad

Janice Caron caron800 at googlemail.com
Fri Oct 12 08:30:38 PDT 2007


On 10/11/07, Olifant <olifant at gmail.com> wrote:
> The keyword "cent" is reserved for 128-bit integers. Could "half" and "quad" be reserved for respectively 16-bit and 128-bit floating point numbers?

I've always thought the names we have for built-in types are (mostly)
horrible. Consider "short", "int" and "long". Seems fine on a 32 bit
processor, but in the far, far future, when even longs are considered
tiny, those words would all be wrong. "cent". - why cent? Cent means
100. So if you use "cent" for a 128 bit integer, what do you use for a
256 bit integer? And what does the "d" stand for in "dchar"? And as
for "quad" and "half" - it's not intuitively obvious that these are
floating point.

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



More information about the Digitalmars-d mailing list