dmd warning request: warn for bitwise OR in conditional
Nick Sabalausky
a at a.a
Sat Jan 23 10:10:36 PST 2010
"Yigal Chripun" <yigal100 at gmail.com> wrote in message
news:hjek8e$4j0$1 at digitalmars.com...
>
> uint a, b; // init to whatever
> bool c, d; // ditto
>
> auto r1 = a AND b; // a & b
> auto r2 = c AND d; // c && d
> ...
> AND stands for whatever *single* syntax is chosen for this.
>
Yuck, that amounts to language-enforced operator overloading abuse, just
like the common mis-design of overloading '+' to mean both 'add' and
'concat'.
More information about the Digitalmars-d
mailing list