Jonathan Scott Duff wrote:
>>Because what you do with a hypothetical has to be reversible.
>
> I thought it was just the hypothetical's existence that has to be
> reversible.
That's not my understanding. You need to be able to cope with this too:
rule alias :w { \$ $name:=<ident> [is named \( $name:=<ident> \) ]? }
and have $name end up bound to the correct submatch even if the closing
paren is missing and the optional block fails.
> Sounds like an optimization that should be in the hands of the
> programmer to me.
Possibly. Though leaving optimization in the hands of the programmer
is generally a Bad Idea.
It's also a matter of syntactic consistency. It has to be := for
"inlined" bindings (i.e. rx/ $name:=<ident> /) because otherwise
we make = meta (which is *not* a good idea). So it probably should be
:= for explicit C<let>s as well.
Damian