[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Globals (more ruminations)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 11 Jul 2010 18:14:48 -0300
> One possible downside of this is that this very simple Lua program:
>
> a = "Hello World"
> print(a)
>
> becomes:
>
> global a = "Hello World"
> print(a)
There should be some toggle to control this. A simple one is the
"global" declaration itself. When a chunk uses a global declaration
it switches on the control.
(You may start you chunk with "global NO, THANKS" ;)
-- Roberto