[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why not Just PHP-stupid include?
- From: Tomas Guisasola Gorham <tomas@...>
- Date: Wed, 19 Oct 2011 09:00:57 -0200 (BRST)
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
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 . I think the "text based include" is not
viewed as a good characteristic, since it promotes hidden dependencies.