lua-users home
lua-l archive

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


On 21 July 2010 12:32, Warlich, Christof
<christof.warlich@thermofisher.com> wrote:
>
>
>> 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.

What next? function foo(local param1, local param2, local param3)?
You've been using C/C++ too long :)

In general I see no reason anyone would ever want a loop to use a
global variable, it's a single line extra in the loop if someone /did/
want to do that however. I'm quite happy with things how they are now,
and the last thing we need is redundant "local" keywords when people
coming from other languages already complain that Lua is too verbose.

Matthew