lua-users home
lua-l archive

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


Hi List,

Has there been any thought to adding tail call support to the Lua C
API? Something like this I would assume:

return lua_tailcall(L, n);

Here lua_tailcall would return a special value (-2?) just like in Lua
5.1 lua_yield (5.2 does a longjmp now). I think the rationale is
fairly obvious so I won't bother going into justification other than
saying this would help with projects like Lua To Cee [1] (they note
the limitation on that page).

[1] http://lua-users.org/wiki/LuaToCee

-- 
- Patrick Donnelly