lua-users home
lua-l archive

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


I believe an error would be possible, and I believe would be easier to debug then an occasional attempt to "x" on a nil value. Changing where the locals are effectively declared would result in loadnils (in the output code) where they really aren't necessary.

I believe Roberto/the authors worry that adding a continue now may well make future modifications to the language that much harder. Still, I'd go for one.

- Alex

----- Original Message ----- From: Hugo Etchegoyen
To: Lua list
Sent: Tuesday, February 26, 2008 1:11 AM
Subject: Re: upcoming changes in Lua 5.2 [was Re: Location of a package]

I don't know the compiler details. Would it be too difficult to consider local declarations after a conditional or unconditional 'continue' an error? Or collect all local declarations (not initializations) at the beginning of a block? For example, treat the given example code as if it was: