lua-users home
lua-l archive

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


> I'd like to rise a question that seems to be being avoided in the
> current threads discussing such things, and it's absolutely critical.
> 
> _G and _ENV are _UGLY. 
> 
> Why all caps? Why the underscore thing? I know it make them look C-ish,
> and that's totally hardcore, but all caps and the underscore thing isn't
> used anywhere else in Lua (or is it?).

  Lua manual, 2.1 - Lexical Conventions

  As a convention, names starting with an underscore followed by uppercase
  letters (such as _VERSION) are reserved for internal global variables
  used by Lua.

  http://www.lua.org/manual/5.1/manual.html#2.3

-- Roberto