lua-users home
lua-l archive

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


On 15/04/17 09:34, steve donovan wrote:
And here is something: I've
found myself using closures more and more, where a traditional OOP
model would need a class for implementation.

Closures in Lua have a strange property: they sort of do the right thing without you having to do explicit design work as in Java or C++. You just have to think about the scope of your variables: what declaration is visible from where, and if you get that right, everything will just work. And the scoping in Lua is very simple.