尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。
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.
@article{Alvarez-Picallo24,
title = {Effect Handlers for C via Coroutines},
author = {Mario Alvarez-Picallo and Teodoro Freund and Dan R. Ghica and Sam Lindley},
journal = {Proceedings of the ACM on Programming Languages},
volume = {8},
number = {OOPSLA2},
year = {2024},
doi = {10.1145/3689798}
}