Re: I'd give my right arm for a continue statement
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: I'd give my right arm for a continue statement
- From: Renato Maia <maia@...>
- Date: 2011年1月28日 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:
do :hidden:
while condition do
...
break :hidden: -- same as 'break'
...
end
end
If that's the case, would 'break' without labels still be supported
(one more thing to learn, document, etc.)? Or maybe become a
deprecated feature?
--
Renato Maia
Computer Scientist
Tecgraf/PUC-Rio
__________________________
http://www.inf.puc-rio.br/~maia/