[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why not Just PHP-stupid include?
- From: "Patrick Mc(avery" <patrick@...>
- Date: Tue, 18 Oct 2011 18:04:33 -0400
On 11-10-18 05:41 PM, Josh Simmons wrote:
I think your points are very strong and I am glad to know the proper
term "text based include" to describe this.
I'm not sure I see any advantage in regressing to a text based
include. Loading external code in Lua is simple and all external code
is handled the same way whether it comes from a string or a file or
puff the magic dragon. If this were to be implemented you'd then have
two different systems (run-time and compile-time) working on the same
problem for little benefit. I certainly don't think this would make
anything easier for anybody.
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.
BTW I am not necessary against require/module for use at the end of a
project. if I wrote 3 or 4K lines of code, then 3 more lines to export
it for others to use is nothing to be concerned about.