Work

Effect Handlers for C via Coroutines

Year: 2024
Type: article
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.
Language: English
Open Access status: diamond
OpenAlex ID: W4403223564
FWCI: 0.886
Cites: 21
Cited by: 6
Related to: 10