|
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? Rich Artym.
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. -- michael bernstein Lead Developer Simoniac Studios http://www.simoniac.com email: michael@simoniac.com web: http://www.michaelbernstein.info