Amphithéâtre Guillaume Budé, Site Marcelin Berthelot
Open to all
-

Abstract

The fourth lecture introduced the notion of the continuation of a program point in an imperative program, or of a sub-expression in a functional program. This is the sequence of calculations remaining to be performed to reach the end of the program, represented either by a programming language object (command, function, etc.), or by a mathematical object. In the 1965-1975researchon denotational semantics, continuations appeared as a means of giving a mathematically precise semantics to thenon-local" goto "branchesof the Algol language.

But it's in the context of functional programming languages that continuations really come into their own : firstly, to fully specify reduction strategies (such as call-by-value and call-by-name) by systematically transforming programs into the Continuation-Passing Style (CPS ) ; secondly, to program manually in this Continuation-Passing Style, which makes it possible to define numerous advanced control structures (iterators, generators, coroutines, cooperativethreads ) in the language itself, in the form of libraries. Finally, adding control operators to a functional language, such as Scheme's call/cc, gives programs new ways of capturing, reifying and restarting their own continuations, enabling advanced control structures to be defined in the language while keeping the program in " direct style ", without manual CPS formatting.

Events