from to
Jacquard control unit for looms. -  Heinz Nixdorf MuseumsForum / Braun, Jan (CC BY-NC-SA)

A computer program describes not only the elementary calculations to be performed on input data, but also the order in which and the conditions under which these calculations are to be performed. To express this sequence of calculations, programming languages provide mechanisms called control structures.Since the " goto "branchesof the first programming languages, numerous control structures have been implemented :loops, procedures and functions, exceptions, iterators, coroutines, exceptions... After a reminder of these classic structures and the historical context in which they appeared, the lecture will develop a more modern approach to control seen as an object that can be manipulated by the program, enabling the programmer to define his own control structures. Initiated in the last century by work on continuations and their control operators, this approach is being revitalized by the theory of algebraic effects and its application in the form of effects and effect managers defined by the programmer in languages such as OCaml 5.

Program