Ian Bicking: the old part of his blog


Continuation Passing Style is related to all this, but I think it is a distraction when trying to understand continuations. (Shouldn't that be obvious, isn't understanding of continuations a prerequesite to understanding a programming style that uses continuations?)

That's letting the name mislead you. In continuation passing style, continuations are explicit - not a feature of the language - and what are they? Just closures. You could call it closure passing style. No matter which approach to continuations you take, the key to understanding them (in the context of ordinary programming languages) is understanding closures.

Once you understand closures, continuations can be explained quite easily in a few different ways. The reason understanding CPS helps is because it connects continuations to the implicit continuations that all functions in most languages use, i.e. the point is that continuations are not esoteric, you depend on them in every program you write. CPS helps you "see" the continuations in your ordinary programs, as opposed to presenting them as something that you've never used before.
Comment on Continuations: a concrete approach
by Anton van Straaten