lua-users home
lua-l archive

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


> Blocks are associated with Tennent's Correspondence Principle which can
> lead to fun with continuations - http://fanf.livejournal.com/118421.html

This principle, or more exactly its interpretation, sounds strange. What
changes the meaning of a break or a continue is not putting them inside
a block, but inside a loop. (If I write "while (1) break;" the break
is not inside any block, but still has a different meaning from a pure
break.) The same for variable shadowing (what changes the meaning is
putting the command inside a "let", not inside a block) and returns.

-- Roberto