Hierarchical coroutines a mechanism for improved program structure
L. Vanek, Rudolf Marty · International Conference on Software Engineering · 1979
The design of a built-in hierarchical coroutine mechanism for a procedural language is described. This mechanism allows the simultaneous activation of coroutines and recursive procedures and permits coroutines to have value or reference parameters. It is argued that this design has clearer semantics than the traditional view of coroutines (particularly in the presence of recursion) while retaining the feature that makes coroutines useful—the ability to leave a coroutine without destroying its internal state. The problems encountered in creating type-safe and well defined parameters are discussed an a solution is outlined.