[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: globals (_locals)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 07 Jun 2001 09:53:31 -0300
> How does this effect the use of Lua as a configuration language?
> Do configuration writers have to use the "global" keyword? That's fine with
> me, but might be hard to remember.
The default should be no declarations, and this default is inherited by
nested functions. So, if you do not use the global keyword, everything
works like in the good old days.
> Under the new system what is the granularity of the setting that requires
> the global keyword? By state, file, function, or block?
Blocks, like ordinary scope rules. Maybe there can be an "outer" setting
(in C) that turns on dmode for your whole app.