in reply to (tye)Re: Will/Can Perl 6 clean up the bit-wise operator precedence mess?
in thread Will/Can Perl 6 clean up the bit-wise operator precedence mess?
The change in precedence of bitwise operators would be less problematic, both because it's a less significant change relative to the precedence chart, and because the current precedence is counter-intuitive.
Besides the comparison operators, the precedence would also change when using bitwise operators with named unary operators. For example, rand $value & $mask is (rand $value) & $mask now, but would be rand($value & $mask) instead.
That sort of code probably wouldn't appear in production either -- I expect a programmer would use parentheses to make the precedence explicit -- but it does seem slightly more likely than the == and & case.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re2: Will/Can Perl 6 clean up the bit-wise operator precedence mess?
by tye (Sage) on Jun 04, 2001 at 07:26 UTC | |
by theorbtwo (Prior) on Mar 18, 2003 at 02:11 UTC | |
by tye (Sage) on Mar 18, 2003 at 18:13 UTC | |
by theorbtwo (Prior) on Mar 18, 2003 at 18:30 UTC |