[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Redefining locals
- From: Rici Lake <lua@...>
- Date: Thu, 11 Nov 2004 12:46:31 -0500
On 11-Nov-04, at 11:54 AM, Mark Hamburg wrote:
Is it useful to be able
to capture a variable and then create a new variable with the same
what appears to be the same scope?
My most common use of the idiom is the following:
local _, _, capture = string.find(str, pattern)
If you couldn't use nested local's, this would be illegal (and most of
my code would break).
Special casing _ strikes me as not a good idea, but perhaps some would