lua-users home
lua-l archive

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


	Hi Patrick

On Tue, 18 Oct 2011, Patrick Mc(avery wrote:
Could you elaborate on why you think loading external code is easy? dofile locals are already out of scope and require forces the use of tables and it's quite verbose.
	In fact, the scope of a local is a feature :-)  If you want a global
scope, just use a global variable :-)
	I think you are misunderstanding Lua's design.  These
constructions (require + tables + locals etc.) are there to enable the
construction of modules [1].  I think the "text based include" is not
viewed as a good characteristic, since it promotes hidden dependencies.

	Regards,
		Tomás

[1] http://en.wikipedia.org/wiki/Modular_programming