|
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).
After some more thinking, I still fail to see downside(s) of skipping the test, more exactly, of passing control to the loop top.
After all, it is a *repeat*, and 'continue' in 'repeat' may also be interpreted (by either a human or a compiler) as "continue to repeat".
'repeat' in Lua doesn't have to behave like 'repeat' or 'do' in other languages. :)
-- Shmuel