[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: AW: AW: non-locals are only sometimes global?
- From: Matthew Wild <mwild1@...>
- Date: Wed, 21 Jul 2010 12:37:54 +0100
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
- References:
- non-locals are only sometimes global?, Warlich, Christof
- Re: non-locals are only sometimes global?, steve donovan
- AW: non-locals are only sometimes global?, Warlich, Christof
- Re: AW: non-locals are only sometimes global?, Peter Odding
- AW: AW: non-locals are only sometimes global?, Warlich, Christof
- Re: AW: AW: non-locals are only sometimes global?, Peter Odding
- AW: AW: AW: non-locals are only sometimes global?, Warlich, Christof