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

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 20 02:56:44 PST 2014


On Thursday, 20 November 2014 at 01:05:51 UTC, H. S. Teoh via 
Digitalmars-d wrote:
> However, the fact that you can freely mix signed and unsigned 
> types in
> unsafe ways without any warning, is a fly that spoils the soup.
>
> If this kind of unsafe mixing wasn't allowed, or required 
> explict casts
> (to signify "yes I know what I'm doing and I'm prepared to face 
> the
> consequences"), I suspect that bearophile would be much happier 
> about
> this issue. ;-)

If usage of unsigned types is not controlled, they will 
systematically mix with signed types, the mix becomes normal flow 
of the code. Disallowing normal flow of the code is even worse.


More information about the Digitalmars-d mailing list