lua-users home
lua-l archive

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


On Sat, Jan 22, 2011 at 11:31 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
> I believe that this "break N" will kill code readability as sure as
> "goto" would.

Yeah, I would get lost pretty quick!  Named labels would help

while C1 do
   while C2 do
       if C3 then continue C1_loop end
   end
end :C1_loop

The labels are also useful at the end of a big set of nested loops -
careful people often comment loop ends, anyway.

This is not a serving suggestion (as they say on packages) just an
indication of how the idea would work - actual syntax is always up for
debate.

steve d.