lua-users home
lua-l archive

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

On 11-10-18 05:41 PM, Josh Simmons wrote:
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.

I think your points are very strong and I am glad to know the proper term "text based include" to describe this.

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.