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

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 21 01:23:01 PST 2014


On Thursday, 20 November 2014 at 21:27:11 UTC, Walter Bright 
wrote:
> If that is changed to a signed type, then you'll have a 
> same-only-different set of subtle bugs

If people use signed length with unsigned integers, the length 
with implicitly convert to unsigned and behave like now, no 
difference.

> plus you'll break the intuition about these things from 
> everyone who has used C/C++ a lot.

C/C++ programmers disagree: 
http://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here/
Why do you think they can't handle signed integers?


More information about the Digitalmars-d mailing list