[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Tail Calls for C Functions
- From: Patrick Donnelly <batrick@...>
- Date: Tue, 31 Aug 2010 18:17:12 -0400
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