Effect handlers allow the programmer to implement computational effects, such as custom error handling, various forms of lightweight concurrency, and dynamic binding, inside the programming language. We introduce cpp-effects, a C++ library for effect handlers with a typed high-level, object-oriented interface. We demonstrate that effect handlers can be successfully applied in imperative systems programming languages with manual memory management. Through a collection of examples, we explore how to program effectively with effect handlers in C++, discuss the intricacies and challenges of the implementation, and show that despite its limitations, cpp-effects performance is competitive and in some cases even outperforms state-of-the-art approaches such as C++20 coroutines and the libmprompt library for multiprompt delimited control.
Fri 9 DecDisplayed time zone: Auckland, Wellington change
15:30 - 17:00 | |||
15:30 30mResearch paper | Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back OOPSLA Jonathan Immanuel Brachthäuser University of Tübingen, Philipp Schuster University of Tübingen, Edward Lee University of Waterloo, Aleksander Boruch-Gruszecki EPFL DOI | ||
16:00 30mTalk | First-class Names for Effect Handlers OOPSLA Ningning Xie University of Toronto, Youyou Cong Tokyo Institute of Technology, Kazuki Ikemori Tokyo Institute of Technology, Daan Leijen Microsoft Research DOI | ||
16:30 30mTalk | High-Level Effect Handlers in C++ OOPSLA Dan Ghica Huawei, Sam Lindley University of Edinburgh, Marcos Maronas Bravo Huawei, Maciej Piróg Huawei DOI |