I’ve been interested in algebraic effects in programming languages for a while, but they’ve been theoretical-only for a while. That’s soon to change though!
OCaml early on adopted algebraic effects and handlers as a way to implement concurrency, something that had been lacking in the language until now. But changing the langugage’s memory model, runtime, garbage collector, etc. proved to be a long task.
OCaml 5.0 is on the horizon at last and includes an implementation of algebraic effects. Unfortunately, I couldn’t find any good tutorials on the version of effect handlers in 5.0. I found a really good tutorial from 5 years ago that was based on a proposed version of OCaml effects, but nothing modern.
[Read More]