in reply to Re^15: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

I'm lazy. if is shorter and requires no translation compared to and so it's a double win. The rawest Perl newbie, or indeed interlopers from most B derived languages, should have little difficulty understanding the if variant. The and variant with its somewhat subtle use of precedence and evaluation side effects is significantly more of a maintenance burden.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re^16: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
  • Select or Download Code

Replies are listed 'Best First'.
Re^17: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by tobyink (Canon) on Oct 12, 2020 at 00:27 UTC
    # Original if (X) { Y; } # Postfix if Y if X; # Low-precedence and X and Y;

    Low precedence and has the advantage that it is ordered "X, Y" instead of "Y, X".