Front Page
Main:
Concatenative languages:
Interesting languages:
Computer science:
External:
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: [factor{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 the only primitive needed to implement exception handling, coroutines, co-operative threads, and backtracking in [[Factor]].
Describe this revision:
Save
All content is © 2008-2010 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.