Other languages
Computer Science
Meta
Continuations are a feature originally found in Scheme. They have a reputation for being hard to understand, and somewhat mysterious. In Concatenative languages, continuations have a very simple explanation: they are a snapshot of the stacks. In Factor, a continuation is an instance of a tuple with several slots, one for each stack:
TUPLE: continuation data call retain name catch ;
Reifying a continuation creates a copy of the stacks, and reflecting it restores the saved copies. That's all there is to it.
This revision created on Sat, 3 Jan 2009 01:14:18 by slava