in reply to (tye)Re2: 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?

Your reasons for doing this are somwhat bogus -- in perl6, one of the new operators (that you're ignoring in the table, so it's reasonable to overlook them) is a boolification operator, so you don't have to abuse !. Simply write ?$expr == ?$cond. Also, you could define a new operator, say infix:ile (for Is Logicly Equivlent To):

sub infix:ile is tighter(==) { ?$^a == ?$^b }
(This uses theDamien's placeholder vars, which I'm not sure are in exactly as I've used them. I need to find time to read A6 again, more carefuly. Also, it may be possible to write this as...
sub infix:ile($a is bool, $b is bool) is tigheter(==) { $a == $b }
And rely on the compiler to coerce the arguments to bools.)


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re^5: Will/Can Perl 6 clean up the bit-wise operator precedence mess? (silly)
by tye (Sage) on Mar 18, 2003 at 18:13 UTC

    Um, to call my reasons (from over 1.75 years ago) "bogus" using features that were announced a few weeks ago is rather silly, no?

                    - tye

      Sorry, I didn't notice the date on this thread, I just saw it mentioned on the chatterbox recently. That does explain why I didn't notice it on newest nodes... ;)


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).