paperbot · PL 论文追踪

RSS

High-level effect handlers in C++

OOPSLA 6(OOPSLA2)2022
Dan Ghica, Sam Lindley, Marcos Maroñas Bravo, Maciej Piróg

尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。

原文摘要(Abstract)

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.

链接与引用

DOI 原文 ·

BibTeX
@article{paperbot1438,
  title = {High-level effect handlers in C++},
  author = {Dan Ghica and Sam Lindley and Marcos Maroñas Bravo and Maciej Piróg},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {OOPSLA2},
  year = {2022},
  doi = {10.1145/3563445}
}