lua-users home
lua-l archive

Re: upcoming changes in Lua 5.2 [was Re: Location of a package]

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


Mark Hamburg wrote:
I've learned to write:
 while condition() do repeat
 if other_condition() then
 break -- continue
end
 until true end
But I always feel compelled to comment it when I do so.
Yes, it works for simple cases, though it feels bad that one is tempted to do workarounds and add comments for what should have been a basic language feature.
(BTW, it isn't possible to do *actual* breaks from this extra inner loop.)
We are used to do without 'continue' in Lua, it's perfectly possible, and not so often we need it, but this just because we know it's not there and are *used* to do without it.
--
Shmuel

AltStyle によって変換されたページ (->オリジナル) /