[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Next Version of Lua?
- From: Florian Weimer <fw@...>
- Date: Thu, 11 Jun 2009 15:47:43 +0200
* Roberto Ierusalimschy:
> Any comment about this?
"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.
This is the way Ada addresses the scoping issue. It hasn't got much
choice, though, because Ada blocks cannot contain variable
declarations, and the variable would be out of scope at the end of the
loop. (Ada hasn't got "continue", either, but there's a "goto".
Looking at my small (by Ada standards) code base, I use goto for two
purposes: emulating "continue" in line-oriented parsers, and retrying
a computation from an exception handler. "exit when" (the "break if"
equivalent) is much more common.)