'int' is enough for 'length' to migrate code from x86 to x64

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 21 00:10:10 PST 2014


"Walter Bright"  wrote in message news:m4mggi$e1h$1 at digitalmars.com...

> BTW, granted the 0x7FFFFFFF problems exhibit the bugs less often, but 
> paradoxically this can make the bug worse, because then it only gets found
> much, much later in supposedly tested & robust code.
>
> 0 crossing bugs tend to show up much sooner, and often immediately.

I don't think I have ever written a D program where an array had more than 
2^^31 elements.  And I'm sure I've never had it where 2^31-1 wasn't enough 
and yet 2^^32-1 was.

Zero, on the other hand, is usually quite near the typical array lengths and 
differences in lengths. 



More information about the Digitalmars-d mailing list