lua-users home
lua-l archive

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


On Mon, Dec 7, 2009 at 10:03 AM, Juris Kalnins <juris@mt.lv> wrote:
> What would be nice to have, instead of arbitrary set of syntax extensions,
> is some hooks into parser, that would allow to implement things like these,
> or like the current shorthand notations as external C library.

This is the best way to accommodate everybody and their 'special
needs'.  I'd suggest looking into a new API for the token-filter patch
so (a) it has minimal impact on programs that don't need it (b) that
it cannot be accidently invoked by defining a global FILTER and (c)
that different token filters can co-exist.

BTW, I'm not particularly worried about |x| x*(x+1) not getting into
stock Lua, since the 'string lambda' form is perfect for the cases
where it is intended, which are _not_ closures, just one-line regular
functions.