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

Araq via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 20 07:40:39 PST 2014


> Most of the statements I disagreed with were opinions.
>
>>>> "unsigned" means "I want to use modulo 2^^n arithmetic". It 
>>>> does
>>>> not mean, "this is an integer which cannot be negative".
>
> Opinion.
>
>>>> Using modulo 2^^n arithmetic is *weird*.
>
> Opinion.
>
>>>> If you are using
>>>> uint/ulong to represent a non-negative integer, you are 
>>>> using the
>>>> incorrect type.
>
> Opinion.
>
>>>> I believe that
>>>> bugs caused by unsigned calculations are subtle and require 
>>>> an
>>>> extraordinary level of diligence.
>
> Opinion (correctly qualified as belief).

It's not only his "opinion", it's his *experience* and if we want
to play the "argument by authority" game: he most likely wrote
more production quality code in D than you did.

Here are some more "opinions":
http://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here/


More information about the Digitalmars-d mailing list