[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Redefining locals
- From: Michael Bernstein <michael@...>
- Date: Thu, 11 Nov 2004 05:12:34 -0500
Dr. Rich Artym wrote:
On Wed, Nov 10, 2004 at 12:53:05PM -0800, Mark Hamburg wrote:
Why does Lua (5.0) allow the redefinition of locals within a single scope?
This has bitten me a few times when I've forward declared something and then
defined it again rather than just assigning to the forward declaration.
Is there any circumstance at all where redefinition provides any benefit,
within a single scope (ie. not subscopes)? I can't think of any offhand.
Maybe this is just a bug?
I can't think of any offhand, but there may be some use at some point,
so theoretically, why have the language limit that?
I'm sure that someone somewhere can think up a use for it.