[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: AW: AW: AW: non-locals are only sometimes global?
- From: "Warlich, Christof" <christof.warlich@...>
- Date: Wed, 21 Jul 2010 12:32:34 +0100
> You mean that the parser would accept the local keyword in "for local
> word in" but act exactly the same regardless?
Yes, exatly, just to allow anyone to verbosly show that the variable is local. The Lua strict module may then even produce a warning if the local is missing.
> Because the absence of local couldn't imply global without breaking
> backwards compatibility. For that you'd need a global keyword instead.
Which would not be too bad either. In C, we also have the "auto" keyword to point out locals although that's the default.