www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Treating the abusive unsigned syndrome

Andrei Alexandrescu Wrote:

 Often large integers hold counts or sizes of objects fitting in computer 

Yes, if that object is system-specific like size of allocated heap chunk. Business objects don't seem to respect system constraints (they are nearly storage-agnostic). Files are the good example.
 There is a sense of completeness of a systems-level language in 
 being able to use a native type to express any offset in memory. That's 
 why it would be some of a bummer if we defined size_t as int on 32-bit 
 systems: I, at least, would feel like giving something up.

Yes, giving somethink up always feels like giving something up. But can you rely on large numbers? I heard a story about program crash on attempt to allocate memory chunk larger than half address space. It was intended to be valid since there was enough address space, it turned out that one dll happened to be relocated at the middle of address space, so there was no continuous mem chunk of requested size.
Nov 28 2008