lua-users home
lua-l archive

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

On Fri, Feb 26, 2010 at 11:40 AM, Stuart P. Bentley
<> wrote:
> _G is too minor to merit the continued existence of _G, and that _ENV should
> pretty much kill _G and take its place. However, _G would really be a pretty
> archaic and inaccurate term (as it denotes "global", which is now an
> entirely arbitrary construction). How about replacing _G with _E?

Even if _G no longer exists, it is occaisionally useful to define it.
You could say

_G = _ENV

in the main program and thereafter this global would behave exactly as
the old _G.

So there is no confusion; 'global' still has meaning - the main module
scope, the one in which all the standard library tables sit.

steve d.