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: "E. Toernig" <froese@...>
- Date: 2011年1月27日 22:43:20 +0100
Roberto Ierusalimschy wrote:
>
> > > I believe that this "break N" will kill code readability as sure as
>[...]
>
> Instead, a simple syntax would be to add labels only to "do end" blocks,
> for instance like this:
>
> do :label:
> ...
> end
What an ugly hack ...
> Then, a continue could be written like here:
>
> while cond do
> do :process_item:
>
> break :process_item:
>
> end
> end
... and that just to create a continue that is spelled "break"?
There are already enough bizarre ways to simulate a continue.
If you want to add continue to the language, that name it
"continue".
Ciao, ET.