lua-users home
lua-l archive

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



> 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.