lua-users home
lua-l archive

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


	Hi Patrick

I understand closure, functions and other tables as table values, local variables etc.. it's just that I only know a limited number of ways to assemble them for privacy.
	I think you are looking for locals inside modules, or upvalues.

Is there something out there akin to a design patterns tutorial for Lua that illustrates various privacy patterns?
	Take a look at Programming in Lua:

http://www.inf.puc-rio.br/~roberto/pil2/ (second edition)
http://www.inf.puc-rio.br/~roberto/book/ (first edition)

	The first edition is freely available:

http://www.lua.org/pil/

	However, it is targeted at Lua 5.0

	Regards,
		Tomás