[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Suggestion: syntax sugar for object methods inside table constructor
- From: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Fri, 28 May 2021 12:05:51 +0300
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.