size_t index=-1;
tsbockman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Mar 19 02:33:25 PDT 2016
On Saturday, 19 March 2016 at 04:17:42 UTC, Jonathan M Davis
wrote:
> The only thing that I'm aware of that Walter has thought
> _might_ be something that we should change is allowing the
> comparison between signed and unsigned integers, and if you
> read what he says in the bug report for it, he clearly doesn't
> think it's a big problem:
>
> https://issues.dlang.org/show_bug.cgi?id=259
>
> And that's something that clearly causes bugs in way that
> converting between signed and unsigned integers does not.
> You're fighting for a lost cause on this one.
>
> - Jonathan M Davis
You do realize that, technically, there are no comparisons
between basic signed and unsigned integers in D? The reason that
*attempting* such a comparison produces such weird results, is
because the signed value is being implicitly cast to an unsigned
type.
The thing you say *is* a problem, is directly caused by the thing
that you say is *not* a problem.
More information about the Digitalmars-d-learn
mailing list