[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Redefining locals
- From: "Bilyk, Alex" <ABilyk@...>
- Date: Thu, 11 Nov 2004 15:14:34 -0800
Some people (not me) now say
local _,_,x = <whatever>
all over their scripts and this relies on
local a, a
being valid in Lua... as odd as it is.
From: Matt Hellige [mailto:firstname.lastname@example.org]
Sent: Thursday, November 11, 2004 3:06 PM
To: Lua list
Subject: Re: Redefining locals
["Bilyk, Alex" <ABilyk@maxis.com>]
> Yeah, I see what you mean. Guess I would agree with
> local f,g
> function g() f() end
> function f() g() end
> being a good compromise. It does seem odd to me that 'local' would create a slot in the same scope when one just like it has already been defined. I wonder if this has been done intentionally or is it really unintended result of keeping things simple. I think the latter is the case and now a bunch ot people got dependent on it.
But who's really dependent on it? You can always achieve the same
result with extra scopes, can't you? It seems like a really strange
feature to me...
Matt Hellige email@example.com