lua-users home
lua-l archive

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


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.
-- 
Existing media are so disconnected from reality that our policy debates
spin around a fantasy world in which the future looks far too much like
the past.   http://www.zyvex.com/nanotech/MITtecRvwSmlWrld/article.html