Treating the abusive unsigned syndrome

Sean Kelly sean at invisibleduck.org
Fri Nov 28 09:58:02 PST 2008


Don wrote:
> 
> length is uint
> byte[].length can exceed 2GB, and code is correct when it does
> uint - uint is an int (or even, can implicitly convert to int)
> 
> As far as I can tell, at least one of these has to go.

This is why I never understood ptrdiff_t in C.  Having to choose between 
a signed value and narrower range vs. unsigned and sufficient range just 
stinks.


Sean



More information about the Digitalmars-d mailing list