On Thu, 2006-11-09 at 11:13 +0100, Michael Haardt wrote:
Hmm, I thought it was settled that encoded-characters were to always be
expanded before variables, such that encoded-characters could be
implemented purely in an implementation's lexer, or even via
pre-substitution.
okay, I wasn't sure it was settled, but I agree this makes the most
sense.
Not to me, I'm afraid. To me, the concept of ${} as boundaries for
"magic inside" asks for strict inside-out evaluation of all magic
enabled by extensions. Should we ever get new ${} extensions, do we
really want to specify a total order for all of them?
yes, I think so. being able to parse this without backtracking is a big
plus in my book. I don't see a compelling use case for nesting these
constructs. if we introduce functions in a similar syntax, I don't
think it will be a big problem that variables expand before the
functions are evaluated. supporting non-constant variable names is just
asking for problems, IMHO.
note that with this ordering, the encoded-character extension can be
byte-compiled away entirely, a very nice property for a language which
is meant to be lightweight and simple.
--
Kjetil T.