On Wed, 10 Oct 2001 15:42:29 +1000 (EST), Damian Conway wrote: >Brent asked: > > > If we have 'and', 'or' and 'xor', can we have 'dor' (defined or) to be a > > low-precedence version of this? > >I actually suggested exactly that to Larry a few weeks back. > >He likes the idea, but is having trouble finding an acceptable name for the >operator.
I'm not convinced it's that useful... The precedence of "dor" would be lower than that of assignment. And it's precisely in assignment where the "//" operator will come in very handy. If you don't need to assign the value of the expression, you can just as wel use defined(): defined($x = foo()) or die "Got an undefined value!"; Plus there's the matter of the name... Do we really need low and high precedence equivalents of every boolean operator? Next, you'll want a low precedence "?:" (or "??::"). We have one already: if/else, but except in do blocks, you can't really use them for expressions. -- Bart.