|
On Fri, Jun 27, 2014 at 6:04 AM, djczaski <djczaski@gmail.com> wrote:Well... as I said in the other thread (and I'm going to repeat myself)
> This is a fantastic idea. I really miss continue in Lua and I don't care for
> the messiness of adding the ::continue:: label. If people are against a
> continue keyword the implicit label and 'goto continue' seem like a
> reasonable alternative. Now if this could only get traction with the Lua
> team and become a standard.
I like how JS uses 'continue' as 'goto'. The syntax would look like:
continue [label];
if some_special_case then
continue
end
if exceptions_a_plenty > 0 then
continue errors_happened
end
-- continue without a label would jump to the end of the parent
block/scope, with a label it would jump to the nearest-scoped label
(shadowing is possible).
Kinda kills to birds with one stone -- kill a keyword, gain continue