lua-users home
lua-l archive

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

LuaJIT supports "goto" yet doesn't allow break as non-last statement in
a block.

If you use goto, you might as well use goto to exit the loop. Jumping
after a break using a forward goto seems incredibly dirty to me...

On 26.07.22 15:27, Paul Ducklin wrote:

>Why should "break" statements be allowed before the end of a block?

Forward goto?

I don’t think I have ever used goto in Lua but it’s there for those
who want it (but was not in 5.1). Maybe that’s the reason for the
grammar change?