|
We already have an opt-in of this behaviour:
local _G = _G; local _ENV = nil
and then use e.g. `_G.print
local next, io, print = next, io, print
-- etc: first cache all the globals you need
local _ENV = setmetatable({},{__index=error, __newindex=error})
If you really hate global-by-default, you can disable it easily.