lua-users home
lua-l archive

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


On Sun, Nov 21, 2010 at 19:52, Mark Hamburg <mark@grubmah.com> wrote:
> (Smalltalk has two return operators. One returns a value from the block. The other returns from the context in which the block was created.)

This could be generalised as
   return[n]

where n is the stack level (comparable to setfenv in 5.1)

There has been talks about generalising break in a similar way. It
could perhaps be made to work from function expressions as well.

-- Pierre-Yves