lua-users home
lua-l archive

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

> 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).

Adding continue would be nice. It is pretty useful and the patch looked
very small.

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

Just out of interest, what happens in the following example?

function foo()
  local foo2 = function()
	   while true do
		break 2
  while true do

Does the "break 2" exit foo()? Or just foo2()?

I don't really like the idea of "break N", but then I haven't really
used a language that uses it. Using "return" and nested functions
somehow seems cleaner, but if it's optional it might be useful