symmetric signed types

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Sat Jan 25 11:43:22 PST 2014


On Saturday, 25 January 2014 at 18:53:29 UTC, Andrei Alexandrescu 
wrote:
> Of course it does. It was the point of my post. It's just that 
> the type is surprising from a basic arithmetic viewpoint.

Yes, I agree. I think it is messy to have implicit promotion of 
unsigned values. For signed ints you get sign-expansion, so they 
are less problematic.

If the programmer does not care about bit-patterns he probably 
just uses regular ints anyway, so why promote when it create bugs 
that are hard to track down?


More information about the Digitalmars-d mailing list