Writing a Lisp: Continuations
Continuations are strangely underused, as they enables writing long-living processes in a simple way, without having to keep them in running in a thread, or even in memory.<p>Then a real programming language can replace all &quot;business processing&quot; crap languages. Let&#x27;s say you write a framework that escapes to a continuation whenever the &quot;process&quot; is waiting for Futures or Promises to complete, and returns the thread to a pool.<p>Depending on what you are waiting for, such as webhooks, asynch events&#x2F;messages, or with some work even outstanding network requests ( if it&#x27;s meaningful ), it would be possible to serialize the continuation to storage, potentially restore it on another machine, weeks later.<p>With some bookkeeping, it would be possible to also store what Futures have been completed, and what the continuation is currently waiting for, so it would be possible to keep track of the progress of the long running process, and use that information to show a nice status report.