@inproceedings{leijen2017implementing, author = {Leijen, Daan}, title = {Implementing Algebraic Effects in C}, editor = {Chang, Bor-Yuh Evan}, booktitle = {APLAS'17, Asian Symposium on Programming Languages and Systems}, year = {2017}, month = {November}, abstract = {We describe an implementation of algebraic effects and handlers as a library in standard and portable C99, where effect operations can be used just like regular C functions. We use a formal operational semantics to guide the C implementation at every step where an evaluation context corresponds directly to a particular C execution context. Finally we show a novel extension to the semantics for optimized tail resumptions and prove it sound. This gives two orders of magnitude improvement to the performance of tail resumptive operations (up to about 150 million operations per second on a Core i7@2.6GHz)}, publisher = {Springer, LNCS volume 10695}, url = {http://approjects.co.za/?big=en-us/research/publication/implementing-algebraic-effects-in-c/}, pages = {339-363}, }