lua-users home
lua-l archive

Re: Why not Just PHP-stupid include?

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


On 11-10-19 07:00 AM, Tomas Guisasola Gorham wrote:
 Hi Patrick
On 2011年10月18日, 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
Hi Tomas
I do not want globals at all, only a simpler environment to type in-Patrick

AltStyle によって変換されたページ (->オリジナル) /