Thank you Alex! Excellent pointers.
Thank you Hendrik. I guess I should have specified that I am interested in how to implement first class serializable continuations, and to interface with them. As you point out, continuation passing style is simply never returning.
A friend of mine was explaining that Microsoft's new Async C# offers a nice interface programatic interface to continuations, where the compiler notices the "yield" keyword, and automatically generates a finite state machine where the current state is captured as a continuation, and then the interface to the continuation is done via IEnumerable. This sounds elegant. Has anyone compared it's ease of use to the gambit/scheme style API?
Hallo,
On Wed, Jun 8, 2011 at 11:35 PM, Hendrik Boom <hendrik@topoi.pooq.com> wrote:
>
> One hack -- Just let your C functions keep calling and never returning.
> When it's time too return, call the continuation as you'd expect.
> You'll never see old stack frames again unless they contain data you
> need to point to. Even cons will just give you stack storage, fill it
> in, and call the continuation with a pointer to the consed cell.