Effect handlers in C++: open source library
Effect handlers allow for programming with user-defined computational effects, with applications including custom lightweight concurrency (threads, async-await, actors, generators), error handling, dependency injection, etc. Effect handlers originate from the realm of functional programming, and the main goal of this highly experimental library is to explore how they fit in the more object-oriented setting of C++.
The library relies on modern C++ features (move semantics, variadic templates, compile-time evaluation) to achieve elegant programmer-level interface, memory management of handlers, and relative type-safety. Internally, it uses the boost::context library for call-stack manipulation, and so it implements one-shot handlers only.
GitHub link: https://github.com/maciejpirog/cpp-effects
Comments are closed
Comments to this thread have been closed by the post author or by an administrator.