[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: should we add a name for global std-function.
- From: starwing <weasley.wx@...>
- Date: Fri, 10 Dec 2010 11:07:54 +0800
Lua5.2 has a new _ENV mechanism, it's simpler than previous global mechanism. and we can writedo
local _ENV = ...
-- codes
end
to set a septate env for code chunks.
but at a most times, we need import standard functions into the new _ENV, e.g. print, pairs, etc. may we register all these std-function into a pre-defined table?
may it named _PRIM or _BASE or _BUILTIN, and we can generate new env table easily.
or we can put this table into stdlib library.