lua-users home
lua-l archive

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

On Sat, Jan 9, 2010 at 11:43 AM, Alexander Gladysh <> wrote:
> The token filters (or other meta-stuff) you ask for are alone worth to
> be a single feature in the next update, and that update should
> probably be called 6.0.

It's true that the current token-filter patch is not production-ready.
There is no way to install various filters independently, since
everything gets done with the Lua global FILTER.

> If you take token filters specifically, I, personally, do not see wide
> adoption of them (perhaps its just me though). There was a lot of hype
> back then token filters were released, but now everything is quiet.

The main argument is that a robust token-filter facility will make the
life of the Lua authors much easier, because many "why can't I have X"
can be answered "write a token filter" ;)

For instance, many of us crave a straightforward try..except
construct, although we're fully aware that it is sugar for pcall().
(A straightforward implementation of try..except is possible, except
that it's hard to detect whether a function issued an explicit return
or not)

It can be argued that lexical filtering is at too low a level, and one
ends up trying to second-guess the parser (e.g., the 'when does an
expression end' problem)  Here we must look at Fabien's Metalua for

The other argument applies to all syntax-modifying schemes: a private
language in a public space is a bad idea.

steve d.