> To save people from having to re-read the thread, here is the actual 
> proposal in detail again:
> 
> PROPOSAL
>   Replace the 'if', 'unless', 'when' statement modifiers by identically 
>   named lowest-precedence left-associative operators that short-circuit 
>   from right to left.
> 
>   This means 'FOO if BAR' is identical to 'BAR and FOO', except it has a 
>   lower precedence, and 'FOO unless BAR' is identical to 'BAR or FOO', 
>   except it has a lower precedence. FOO and BAR are arbitrary expressions.
>   Because of left-associativity, 'FOO if BAR if BAZ' is identical to
>   'BAZ and BAR and FOO'.
> 
>   'FOO when BAR' is similar to 'FOO if BAR' except BAR is matched magically 
>   like the rhs of the ~~ operator and an implicit 'break' occurs if true.
> 
> RATIONALE
>   1. it doesn't hurt anything: existing use of the modifiers (now operators) 
>      remains functionally the same.
>   2. it allows new useful expressions
>   3. it is more consistent: 'if' has no reason being more special than 'and',
>   4. it shouldn't make parsing more difficult

This seems like it's just begging the question.  How is a
left-associative operator "less special" than a non-associative one?
And you speak of consistency, but wouldn't it be better to have C<if>
be consistent with C<for> and C<while> rather than C<and> and C<or>?
(Seeing as C<if> is explicitly a control-flow construct)

So it's really a consistency thing.  If people notice they can do:

    FOO if $BAR if $BAZ;

Then they'll assume they can do:

    FOO for @BAR while $BAZ;

Which they can't.

our answer is no if says Larry: so unless .doesnt;

Luke

Reply via email to