lua-users home
lua-l archive

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


On 9 April 2013 04:51, Tim Hill <drtimhill@gmail.com> wrote:
> I'll be honest I don't see this as buying much … at the end of the day:
>
> \(x,y) (x+a*y)
> function (x,y) return x+a*y end
>
> All you have done is replace "function" with "\" and have an implied return statement. Personally, I like that Lua has so FEW shortcuts .. yes, it adds typing but think how easy it is to read? And remember, EVERYONE has there own pet little "it would be nice if…" and if they were all added Lua would cease to be Lua (imho).
>

Agreed. If people want to dabble in syntactic sugar, the burden
of maintenance should be on them, not on mainline Lua.

On Apr 8, 2013, at 6:41 PM, oliver <oliver.schoenborn@gmail.com> wrote:
> ... metalua is not an option ...
>

Why is Metalua not an option? It has an extension already for this case
and the syntax is probably the most "natural" looking I've seen.