'int' is enough for 'length' to migrate code from x86 to x64
Nick Treleaven via Digitalmars-d
digitalmars-d at puremagic.com
Sat Nov 22 09:11:57 PST 2014
On 20/11/2014 08:02, Walter Bright wrote:
> On 11/19/2014 5:03 PM, H. S. Teoh via Digitalmars-d wrote:
>> 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. ;-)
>
> Explicit casts are worse than the problem - they can easily cause bugs.
I recently explained to you that explicit casts are easily avoided using
`import std.conv: signed, unsigned;`.
D compilers badly need a way to detect bug-prone sign mixing. It is no
exaggeration to say D is worse than C compilers in this regard. Usually
we discuss how to compete with modern languages; here we are not even
keeping up with C.
It's disappointing this issue was pre-approved last year, but now
neither you nor even Andrei seem particularly cognizant of the need to
resolve it. If you belittle the problem, you discourage others from
trying to solve it.
More information about the Digitalmars-d
mailing list