lua-users home
lua-l archive

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


So I was reading the reference manual to try to understand what role _G plays in a Lua program and I’m not having much luck. Adding an element to _G adds it to _ENV, but setting _G=nil doesn’t delete _ENV, so I know they aren’t referencing the same thing. If you do take the time to help this noob out, could you please include in your answer the importance having both _ENV and _G, thanks.