On Tue, 8 Oct 2002, Larry Wall wrote: > : but I think the latter is unnatural enough that it deserves parens, so I'd > : put 'but' above comma (and probably '='), but below just about everything > : else. > > Could perhaps unify with C<..>. Wouldn't hurt for it to be > non-associative like C<..>.
'Is' and 'but' return their left operand to allow chaining, so don't 'is' and 'but' need to be left associative so the following will work? 0 but true but string('zero rows affected') > I'd be more inclined to unify & and | with * and +, since that's > exactly what they are in Boolean algebra, where 1*1 == 1. I think > the argument that it breaks C compatibily is weak in this case, > since almost everyone admits that C is broken in this respect. Good point. > Alternately, we take | and & away from bitwise ops and do something > more useful with them. I have been asked privately by a sight > impaired person to consider using | as the separator for parallel > streams rather than the almost invisible ; character, for instance. > Being a bit sight impaired myself at the moment, I have great empathy... | and & do one thing different from + and *. They impose integer context on their operands, rather that just numeric. How about moving ** down to just above *? There's no precedence from C, and -$a**2 is a bit counter-intuitive mathematically. I'm not sure what the intuitive behavior should be for the other unary operators though. I can post a revised table if the associativity of 'but' is clarified. ~ John Williams my $zen = true but false;