Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Continuation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Kinds== Support for continuations varies widely. A programming language supports ''re-invocable'' continuations if a continuation may be invoked repeatedly (even after it has already returned). Re-invocable continuations were introduced by [[Peter J. Landin]] using his '''J''' (for Jump) operator that could transfer the flow of control back into the middle of a procedure invocation. Re-invocable continuations have also been called "re-entrant" in the [[Racket (programming language)|Racket]] language. However this use of the term "re-entrant" can be easily confused with its use in discussions of [[Thread (computing)|multithreading]]. A more limited kind is the ''escape continuation'' that may be used to escape the current context to a surrounding one. Many languages which do not explicitly support continuations support [[exception handling]], which is equivalent to escape continuations and can be used for the same purposes. C's <code>[[setjmp/longjmp]]</code> are also equivalent: they can only be used to [[stack unwinding|unwind the stack]]. Escape continuations can also be used to implement [[tail call elimination]]. One generalization of continuations are [[delimited continuation]]s. Continuation operators like <code>call/cc</code> capture the ''entire'' remaining computation at a given point in the program and provide no way of delimiting this capture. Delimited continuation operators address this by providing two separate control mechanisms: a ''prompt'' that delimits a continuation operation and a ''reification'' operator such as <code>shift</code> or <code>control</code>. Continuations captured using delimited operators thus only represent a slice of the program context.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)