Walter - Discrepancy between EqualExpression spec and implementation

Unknown W. Brackets unknown at simplemachines.org
Fri Jun 2 21:26:25 PDT 2006


I have been known to revert checkins for code line that, haha.

Still, I like that I can write something like this:

x = original_x * cos(angle) - original_y * sin(angle);
y = original_y * cos(angle) + original_x * sin(angle);

And know it will work as I expect.  For this reason, I love operator 
precedence.

But I agree that "x == y == z" is just wrong.  I even take it farther 
and can't stand when people do "x = y = 0;", even if it is fine code.

Everyone has their own preferences.

-[Unknown]


> 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