lua-users home
lua-l archive

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


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. 

Alex

-----Original Message-----
From: Matt Hellige [mailto:matt@immute.net]
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

-- 
Matt Hellige                  matt@immute.net