Notes IV

Robert Fraser fraserofthenight at gmail.com
Wed Jan 23 21:09:20 PST 2008


Jason House wrote:
> I've never been all that happy with the fixed size thing...  I think sizes should be compiler-dependent unless the user is explicit about what they want.  That gives the compiler room for optimization on whatever the hardware happens to be.  I'd actually like to see "int" be variable length and have stuff like int8, int16, int32, int64 have set sizes.  In my mind, it has the added benefit of making code that uses them more readable as requiring a fixed size.

Ewww no! That's why there's #defines at the top of every big C program 
to ensure the sizes match up. Will there be an overflow here on one 
processor but not on another? How should this value be serialized? These 
are the sort of questions I don't want to have to deal with. 
Furthermore, that would make pointer arithmetic and inline assembly, 
among other low-level things, harder.



More information about the Digitalmars-d mailing list