As I surveyed my requirements, I realized that what I most wanted was for a subroutine to be able to pause in the middle and resume sometime later, maybe even after a reboot of the whole program. Was that so much to ask?
The answer to this question took me on a strange journey via coroutines, CPS transforms, state machines, exotic language features, distributed computing – until finally dumping me in a place of relative joy and contentment. As they say, the spice must flow. But how it flows, and where, is largely up to us.
Video source: http://act.yapc.eu/ye2014/talk/5634