Hacker News new | ask | show | jobs
by anonymoushn 5253 days ago
With a small patch to add coroutine.clone[1], you can have continuations in Lua[2].

[1] http://lua-users.org/lists/lua-l/2006-01/msg00652.html

[2] https://github.com/torus/lua-call-cc

1 comments

Which is to say, Lua's coroutines are isomorphic to single-shot continuations* - you can implement either in terms of the other.

* Full continuations, with copying.

Great paper: "Revisiting Coroutines" (ftp://ftp.inf.puc-rio.br/pub/docs/techreports/04_15_moura.pdf)