On Tue, 12 Jun 2007 06:20:49 +1000, Damian Conway wrote:
> The mandatory else-part is one of the most valuable features of 
> the ternary operator. It helps ensure that variables initialized with a 
> cascaded ternary actually do get initialized

Notwithstanding the above argument, can someone tell me why you can't just
use && ... || in place of ?? ... !!, now that && and || propagate context
to both sides?  This is probably a failure of my imagination, but the only
difference I've found so far is that && and || aren't lvaluable.  Could
they be made so?

pugs> my $a = 42; (1 && $a) = 17;
*** Can't modify constant item: VInt 42
pugs> my $b = 42; ($b || 0) = 17;
*** Can't modify constant item: VInt 42

-- 
Peter Scott

Reply via email to