[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $$... parsing



> > Maybe the parsing rules ought to be changed so that $$name(4) and
> > $($name)(4) are parsed the same (and the latter the way I would have
> > expected it to)?  

> This still might be a good idea.

subscript handling is rather unsatisfactory right now in es, due to
its rc heritage.  (see Tom Duff's only complaint against rc's syntax
other than free carets.)

when/if es moves toward extensible syntax is the right time to debate
such a change.  for now, making $($name)(4) parse would actually be
very difficult.

on the other hand, changing the interpretation of $$name(4) seems to
just require switching the precedence declarations of '$' and SUB in
parse.y and i couldn't find any immediate evil effects.  since $($name(4))
is currently legal es syntax, it does make some sense to change the
precedences.

i consider this very minor issue; if there's broad consensus to change
it, let's change it.  compatibility seems to be the downside, but the
number of times i've typed $$foo(n) is very small.

paul