Ian Bicking: the old part of his blog


I may be completely wrong, but the idea of continuations I got from Smalltalkers was something like this:

imagine the stack for a function A that called function B... function A has some local variables its stack-frame, and function B has some local variables in its stack-frame, and there is a pointer to the code instruction in function B that will be called when function A returns. Now, in some Smalltalks, the stack-frames are actually objects.

So instead of a thread of execution creating and disposing of the stack-frame objects, we sort of "suspend" the thread, and retain the stack frames in memory. Smalltalk would actually keep those stack frame objects in the heap instead of the CPU's stack.

For a web-app framework like Seaside manages those stack-frames, causing them and their associated code to be executed in response to events...

This kind of goes back to "an object is like a little computer that responds to messages" that was Alan Kay's basic idea of OO programming in the late 1960's.
Comment on Continuations: a concrete approach
by keith ray