[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: continue/repeat...until false dichotomy
- From: Majic <majic.one@...>
- Date: Wed, 17 Feb 2010 09:24:38 -0800
How about `skip' or `next'?
On Wed, Feb 17, 2010 at 8:17 AM, David Kastrup <dak@gnu.org> wrote:
> Mark Hamburg <mark@grubmah.com> writes:
>
>> If one must have continue, and I will admit to missing it fairly routinely in some code, then there are a couple of simple options with respect to the scope rule:
>>
>> 1. Disallow continue when the innermost loop is a repeat/until loop.
>> 2. Disallow access to variables defined inside the loop in the condition portion of a repeat/until that also includes a continue statement.
>
> What about
>
> 3. continue means to restart iteration at the top even in repeat-until,
> unlike C's behavior.
>
> In that way, the scope of the condition is irrelevant. If you think
> that this might confuse C users, call it "reloop" or "reiterate" or
> "loop" or whatever instead of "continue".
>
> I think that behavior would be more useful anyway. "continue" implies
> restarting some loop in a short circuit, and the whole point of
> repeat..until is that the condition is only fully established once you
> have completed the body, so the short circuit way is not likely to have
> established all the material for a useful evaluation of the loop
> condition, anyway.
>
> --
> David Kastrup
>
>
- References:
- Re: continue/repeat...until false dichotomy, Florian Weimer
- Re: continue/repeat...until false dichotomy, Kelley, Brian
- Re: continue/repeat...until false dichotomy, Matthew Wild
- Re: continue/repeat...until false dichotomy, Kelley, Brian
- Re: continue/repeat...until false dichotomy, Matthew Wild
- Re: continue/repeat...until false dichotomy, David Given
- Re: continue/repeat...until false dichotomy, David Kastrup
- Re: continue/repeat...until false dichotomy, Mark Hamburg
- Re: continue/repeat...until false dichotomy, David Kastrup