laziness, impatience, and hubris | |
PerlMonks |
Will/Can Perl 6 clean up the bit-wise operator precedence mess?by tye (Sage) |
on Jun 02, 2001 at 04:07 UTC ( [id://85125]=perlmeditation: print w/replies, xml ) | Need Help?? |
I've recently been reminded how much I hate the fact that C got the precedence for the bit-wise operators completely wrong (something which I believe at least one of Kernighan and Ritchie have publicly admitted to). I know I'm way past the Perl 6 RFC process and this isn't the Perl 6 discussion list. But I wanted to throw this out here first... Wouldn't it be great if Perl 6 were to fix this brain damage that has plagued (well, a somewhat minor plague) C, C++, Perl 4, and now Perl 5? Here is how I'd prefer to have operator precedence table in Perl (note that I'm listing only Perl 5 operators even though I know these change will never make it into Perl 5):
This preserves the relationship between the operators that you might already be mixing together, but removes the major breakedness of, for example, == binding tighter than &, |, and ^ so that you could finally just say: if( 0 == $mask & $value ) { - tye (but my friends call me "Tye")
Back to
Meditations
|
|