lua-users home
lua-l archive

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

On Tue, Feb 12, 2013 at 10:17 AM, Peter Slížik <> wrote:
> Okay, here's the new thread I announced a while ago...
> Lua-users wiki cites Roberto's words:
> "Local by default is wrong. Maybe global by default is also wrong, [but] the
> solution is not local by default."
> Could anybody who understands Lua innards elaborate?
> Peter

Lua isn't really "global by default" -- it's "upvalue by default",
with "global" being a fallback should there not be an upvalue.

If Lua were "local by default" then it becomes difficult to specify
WHICH enclosing scope you're really talking about when you don't want
a local.

/s/ Adam