Hacker News new | past | comments | ask | show | jobs | submit login

This is one way to structure it but not the only. Scheme's call-with-current-continuation comes to mind here.



One really nifty use case of continuations is the Seaside Smalltalk web framework [1]. It implements stateful request/response conversations with Smalltalk's ability to capture and serialize continuations.

Continuation-based web frameworks are really nifty, but have potential scaling bottlenecks. IIRC HN originally used some type of continuation web framework with Arc, but ran into scaling and caching headaches. Dunno how it works these days.

[1] https://en.wikipedia.org/wiki/Seaside_(software)


I didn't know it can serialize continuation! I always thought that with seaside you have to run a single server, and any reboot would just kill the state.


I didn't think callCC can do multiple resumptions? DDBinding certainly can, and can do partial environment closures so you can migrate a process to a different machine as well: https://okmij.org/ftp/papers/DDBinding.pdf

The above is succinctly implemented in wat: https://github.com/manuel/wat-js (also see forks for more documented versions).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: