[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Global by default
- From: Coda Highland <chighland@...>
- Date: Tue, 12 Feb 2013 11:08:39 -0800
On Tue, Feb 12, 2013 at 10:17 AM, Peter Slížik <peter.slizik@gmail.com> 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