lua-users home
lua-l archive

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




On 11/02/16 10:29 PM, Peter Aronoff wrote:
Jonathan Goble <jcgoble3@gmail.com> wrote:
I have always interpreted the manual's "convention" as referring
specifically to global names (i.e. fields in _G), since Lua may use such
names for its own purposes (e.g. _G and _VERSION). I've never interpreted
it to mean that such names should be avoided even in module tables, since
Lua itself doesn't use such names anywhere but _G.
That's what I've always thought too. But since the manual's advice has come
up a couple of times on this thread, I thought I would check what others
thought.

Thanks.
Don't forget locals. You don't want to have a local named _ENV unless you mean the lexically-scoped environment.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.