lua-users home
lua-l archive

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


I agree with you,

It would really help with metatable construction and OOP.

On Fri, May 28, 2021, 11:06 Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
I'd like to suggest to treat
{ function a() end }
as equivalent of
{ a = function() end }

Such sugar would be useful in metatable constructors and in OOP.
It would not break old code: new syntax was a syntax error in previous Lua versions.