Re:Writing a Lisp: Continuations
by AstralStorm on Thursday May 18, 2017 @10:35PM
(#14372658)
Async/await does not allow you to suspend a computation and then resume it, and it is not easy to chain.
Re:Writing a Lisp: Continuations
by somethingsimple on Thursday May 18, 2017 @10:45PM
(#14372690)
If you implement your own awaiter with INotifyCompletion [1], you get the continuation as an Action that you can invoke as you will. TBH I haven't done it, but I believe you could use that to implement something akin to call/cc.
[1] https://msdn.microsoft.com/en-us/library/system.runtime.comp...
I know we're not meant to comment on downvoting but I want to uncover the error in my understanding of this subject because at least 3 people downvoted but there is no reply yet??