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

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 21 17:47:20 PST 2014


On 11/21/14 11:34 AM, Daniel Murphy wrote:
> "Andrei Alexandrescu"  wrote in message
> news:m4nn38$1lau$2 at digitalmars.com...
>
>> What is your point? (Honest question.)
>
> That using signed integers exclusively eliminates one class of bugs,
> while making another class only marginally more likely.
>
>> Are you proposing that we make all array lengths signed?
>
> No, I think that ship has sailed.  But I recommend avoiding unsigned
> types for general arithmetic.

That's reasonable. Also I agree that the discussion is moot. -- Andrei


More information about the Digitalmars-d mailing list