[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: I'd give my right arm for a continue statement
- From: Renato Maia <maia@...>
- Date: Fri, 28 Jan 2011 13:24:48 -0200
On 27 Jan 2011, at 14:42, Roberto Ierusalimschy wrote:
In Lua, we cannot have traditional labels, because the syntax "foo:"
already has a different meaning. Instead, a simple syntax would be to
add labels only to "do end" blocks, for instance like this:
If I understand this correctly, old 'break' (without labels) would
became superfluous as it would be mainly a sugar to break a hidden
'do ... end' around the innermost loop, like:
while condition do
break :hidden: -- same as 'break'
If that's the case, would 'break' without labels still be supported
(one more thing to learn, document, etc.)? Or maybe become a