lua-users home
lua-l archive

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



I'm sceptical about break N as well (for the same reasons).

Adding 'continue' would be sort-of "beautiful" since it would make the language orthogonal (is that the right word - meaning having the full of something, instead of just half of it).

Actually, i added "continue patch" to the upcoming gluax releases, so that variant will be having it in the future.

.ak


Tuomo Valkonen kirjoittaa maanantaina, 23. kesäkuuta 2003, kello 16:27:

On Mon, Jun 23, 2003 at 07:35:24PM +0900, Dylan Cuthbert wrote:
I second this break <n> continue <n>  syntax.

So please, someone put it in the main lua source so I don't have to keep
patching it.

While I don't miss continue, I'm not opposed to adding it. I am, however,
_strongly_ opposed to complicating the language with break and continue
levels. If you add those, you might just as well add 'goto' and we all
know how people feel about it. (I actually use goto in C, but only to
jump to an error handler at the end of a function. In languages like
Lua 1) most of the time there is no need for such handlers and 2) when
there is, there are many alternative implementations thanks to lexical
scoping and first-class functions.)

--
Tuomo