lua-users home
lua-l archive

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

On 12/19/11, Alexandre Erwin Ittner <> wrote:
> 2011/12/19 Javier Guerra Giraldez <>:
>> In Lua, if a += operator gets accepted, it would have to be _very_
>> clear if it's a mutating operator (and would have to add the
>> respective metatable operators) or if it's just sugar for a=a+b
>> (making the syntax somewhat misleading)
> All this talk about including new operators, keywords, etc. makes me
> wonder about the possible inclusion of token filters, a Lisp-like
> macro system or other metaprogramming facility in the next major
> release. It may give an answer for all these "Lua do not have my
> favorite operator/statement/conditional construction/etc." questions,
> perhaps at the cost of generating some Perlish monstrosities like
> Lingua::Romana::Perligata [1]
> [1]
> --
> Alexandre Erwin Ittner -
> OpenPGP pubkey 0x0041A1FB @

I believe that new keywords and control structures might be too
confusing. But I can imagine the definition of arbitrary operators
using only non-alphanumeric characters; plugging them into the
metatable mechanism, with definable priority, if they are prefix or

Of course, it might be simpler to just plug lpeg into lua and have
everyone define their DSLs inside strings