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

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 20 20:53:31 PST 2014


On 11/20/2014 7:11 PM, Walter Bright wrote:
> On 11/20/2014 3:25 PM, bearophile wrote:
>> Walter Bright:
>>
>>> If that is changed to a signed type, then you'll have a same-only-different
>>> set of subtle bugs,
>>
>> This is possible. Can you show some of the bugs, we can discuss them, and see if
>> they are actually worse than the current situation.
>
> All you're doing is trading 0 crossing for 0x7FFFFFFF crossing issues, and
> pretending the problems have gone away.

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.


More information about the Digitalmars-d mailing list