Add labeled break and continue statements#219
Conversation
|
My preference would be to have the label follow the for i = 1, 10 do: label
if i == 8 then
continue label
end
endWhile I'm not strictly proposing this syntax (it gets weird due to e.g.
|
|
While this would be a nice feature I am not sure about the syntax to to add a label. Could we lean into attributes here with something like |
|
I like it.
Never was attached to it. It looks ugly :) |
|
I like this, something like this would be nice to have. I enjoy the extended do block syntax, an uncommon pattern I do sometimes when I need to check a bunch of different things that chain off of each other is something like: -- execution starts
repeat
local character = Player.Character
if not character then
break
end
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then
break
end
ApplyDamage(humanoid, 10)
until true
-- execution continues |
I was unsure about the syntax at first, but using |
|
Even |
imo, |
Rendered.