lua-users home
lua-l archive

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


David Given wrote:
> Basically, this kind of extension adds convenience rather than
> functionality, and as such I do not believe it belongs in the core
> language due to the additional complexity the extension requires. (In
> fact, I'd argue against the 'function foo()' syntax, too, but it's
> too late now for that.) This sort of thing is, IMO, better suited for
> a precompilation step or a local modification, than something that
> has to be designed so that it suits everyone.      

That's precisely the purpose of the idea of integrating token filters in
stock Lua distribution. People want syntactic sugars but don't want to
maintain a patch of the core Lua sources. So they ask the syntactic
sugar to be put directly in official distribution. With token filters,
syntactic sugars become data-driven, and people could easily add them to
stock Lua, without having to worry about maintenance (maintaining a
module is much easier than maintaining a patch of the Lua core). They
would also become easy to distribute and combine, whereas a patch is
not.

To quote you, token filter adds the "features" necessary to allow
everyone to add "convenience" *easily* on their own copy of Lua
(patching Lua core is *not* easy). And token filters are well designed
enough to suit almost everyone. That's also the case of metalua, though
in a heavier way.