lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
  repeat
    ...
    if something then continue end
    ...
    local x = ...
    ...
  until something-with-x

We have two options: either the continue jumps into the scope of 'x'
bypassing its declaration/initialization (very bad), or the continue
skips the test altogether (very bad too).

So, it seems that continue is incompatible with this scope rule...

IMO, the value of having 'continue' would be much greater than that of this scope rule. I'd love to see canceling this rule in favor of adding 'continue'. That is, the expression-parameter of 'until' would resolve its variables in the scope enclosing the repeat loop.

--
Shmuel