Walter - Discrepancy between EqualExpression spec and implementation
renox
renosky at free.fr
Fri Jun 2 15:34:22 PDT 2006
Unknown W. Brackets wrote:
> Forgive me if I am off-base here, but the following code:
>
> int main()
> {
> int i = 0;
> bool b = i == 0 == true !is false;
>
> return 0;
> }
>
> Compiles without errors.
Urgh, if I see someone coding like this, let's just say that I won't be
polite..
At some point I wonder if it wouldn't be better if in the language all
the operators shouldn't have the same priority, just to force the
programmers to use parenthesis!
The only downside I see is a big pitfall for the beginners and perhaps
less opportunity for optimisation by the compiler depending of the
implementation..
Regards,
RenoX
More information about the Digitalmars-d
mailing list