Abstract
Effect handlers provide a structured means for implementing user-defined, composable, and customisable computational effects, ranging from exceptions to generators to lightweight threads. We introduce libseff, a novel effect handlers library for C, based on coroutines. Whereas prior effect handler libraries for C are intended primarily as compilation targets, libseff is intended to be used directly from C programs. As such, the design of libseff parts ways from traditional effect handler implementations, both by using mutable coroutines as the main representation of pending computations, and by avoiding closures as handlers by way of reified effects. We show that the performance of libseff is competitive across a range of platforms and benchmarks.
Original language | English |
---|---|
Article number | 358 |
Pages (from-to) | 2462-2489 |
Number of pages | 28 |
Journal | Proceedings of the ACM on Programming Languages |
Volume | 8 |
Issue number | OOPSLA2 |
DOIs | |
Publication status | Published - 8 Oct 2024 |
Event | The 2024 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity - Pasadena, United States Duration: 20 Oct 2024 → 25 Oct 2024 https://2024.splashcon.org/ |
Keywords / Materials (for Non-textual outputs)
- effect handlers
- coroutines
- C
Fingerprint
Dive into the research topics of 'Effect handlers for C via coroutines'. Together they form a unique fingerprint.Datasets
-
Effect Handlers for C via Coroutines - Artifact
Alvarez-Picallo, M. (Creator), Freund, T. (Creator), Ghica, D. R. (Creator) & Lindley, S. (Creator), Zenodo, 1 Sept 2024
DOI: 10.5281/zenodo.13619817, https://doi.org/10.1145/3689798
Dataset