lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Sun, Jan 23, 2011 at 22:55, Miles Bader <> wrote:
> Leo Razoumov <> writes:
>>> Not at all.  It would reenter the loop at the top.
>> This makes perfect sense to me and leads to readable code. Skipping to
>> the end-of-a-loop has potential scoping problems but skipping to
>> beginning-of-a-loop seems to have none.
> ... at the expense of being inconsistent and confusingly different than
> other languages...
> -miles

Which languages do you mean? C, for example, does not have
repeat...until construct and, moreover, with its strict "declarations
come first" (C89) policy scoping of condition expressions is
consistent across 'continue'.
do...continue;...while() does skip to the end and evaluates condition
but it is not called repeat...until :-)
Seriously though, in dynamical languages it is difficult to "skip
forward" while it is easier to "skip backward".