lua-users home
lua-l archive

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


What else would it take? What's wrong with just load()?

-----Original Message----- From: Peter Cawley Sent: Saturday, August 21, 2010 A6:15 Newsgroups: gmane.comp.lang.lua.general
To: Lua list
Subject: Is Lua 5.2-work4's loadin function too strict?

I think that "loadin(_ENV, ...)" may become a common pattern in Lua
5.2 for loading something into the same environment as the function
doing the loading. I also think that "_ENV = nil" may become a common
pattern for catching accesses to global variables. Unfortunately,
these two patterns are currently incompatible as "loadin" only accepts
tables for its environment parameter. Hence I think that "loadin"
should be changed to allow a wider range of values for its environment
parameter.