lua-users home
lua-l archive

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

Here's a variation of  your code using closures to create private
Notice that it pretty much makes the,...) and a:foo(...)
unecessary but I left it to conform with your example.

Additional reading on the subject can be done here:


steve code using _newindex is quite interesting! Lua once again
surprises me (in a good way :)