[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Next Version of Lua?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 11 Jun 2009 11:30:13 -0300
> * Roberto Ierusalimschy:
> > Any comment about this?
> > http://lua-users.org/lists/lua-l/2005-09/msg00548.html
> "until" could have been "break if", and the "repeat ... until exp"
> could have been "repeat ... break if exp end", where "repeat ... end"
> is an endless loop.
It is, and that is the problem. If you have repeat + continue, it
repeat ... continue ... break if exp; end
With this interpretation, the continue goes to the end of the loop,
bypassing the "break if exp". This is not what most people expect
BTW, this is completely parallel with while, which may read
as "repeat break if not exp; ... end". But this intepretation has
no problems with continue.