|
|
Kolmogorov seminar on computational complexity and descriptive complexity
March 12, 2012 16:45, Moscow
|
|
|
|
|
|
Continuations as first-class values and their application in programming
M. A. Raskin |
Number of views: |
This page: | 177 |
|
Abstract:
In most programming languages execution of any subroutine can be terminated as soon as the result is found; this is typically done by an operator RETURN. RETURN can be called only from the body of this subroutine. The idea of “continuations” is to put operator RETURN to a variable. Support of continuations in programming languages varies very widely. Even without explicit language support continuation-passing style helps to manipulate the flow of control in somewhat arbitrary ways. Full continuation support allows to rerun a
computation several times as if some function returned some other value than what it returned during the initial run.
In the talk we shall survey different types of supports of continuations (in Scheme and related languages), discuss some libraries providing a kind of “nondeterministic” computations and (if by chance we have enough time) some other examples of practical applications.
|
|