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

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 25 01:43:34 PST 2014


On Monday, 24 November 2014 at 21:34:19 UTC, Walter Bright wrote:
>> In exchange, 99% of uses of unsigned would disappear from D 
>> code, and with it, a
>> whole category of bugs.
>
> You're not proposing changing size_t, so I believe this 
> statement is incorrect.

The idea is to make unsigned types opt-in, a deliberate choice of 
individual programmers, not forced by the language. Positive 
signed integers convert to unsigned integers perfectly without 
losing information, so mixing types will work perfectly for those 
who request it.


More information about the Digitalmars-d mailing list