What You See Is What You Get: Practical Effect Handlers in Capability-Passing Style

by Jonathan Immanuel Brachthäuser

In Ernst Denert Award for Software Engineering 2020. Springer International Publishing, 2022.

This publication is related to the Lexical Effect Handlers research project.

Abstract

Structuring control flow is an essential task almost every programmer faces on a daily basis. At the same time, the control flow of software applications is becoming increasingly complicated, motivating languages to include more and more features like asynchronous programming and generators. Effect handlers are a promising alternative since they can express many of these features as libraries. To bring effect handlers closer to the software engineering practice, we present capability passing as an implementation technique for effect handlers. Capability passing provides the basis for the integration of effect handlers into main-stream object-oriented programming languages and thereby unlocks novel modularization strategies. It also enables programmers to apply lexical reasoning about effects and gives rise to a new form of effect polymorphism. Finally, it paves the path for efficient compilation strategies of control effects.