lua-users home
lua-l archive

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


On Wed, Jan 13, 2010 at 8:23 PM, Joshua Jensen <jjensen@workspacewhiz.com> wrote:
Metalua has a goto, I believe.  I never paid any attention to how it was implemented.  I always thought the Lua VM had a goto, because Metalua writes out Lua VM instructions.

The VM has (almost) got one, but there is no corresponding user-level control: it's only used as a mean to implement loops and conditionals.
 
Besides, it's not clear how compatible it will be with LuaJIT; to be LuaJIT compatible, it will probably be necessary to impose a limit, namely that you can jump out of a block, but not in a block. 

Anyway, I can't think of a reasonnable use case for jumping inside a loop, and the "proper" way to handle local variables in which scope you entered is unclear at best.

-- Fabien