Abstract: “The language Eff is an Ocaml-like language serving as a prototype implementation of the theory of algebraic effects… we present the embedding of Eff into Ocaml… demonstrate correctness… embedding is systematic, lightweight, performant, and supports even higher-order, dynamic effects with their polymorphism. Ocaml thus may be regarded as another implementation of Eff, broadening the scope and appeal of that language.”
Well, “in OCaml” here turns out to mean “in multicore OCaml,” which is not stable yet and isn’t going to be released for some time. Still cool, but kind of sad.
If I’m reading correctly, it doesn’t require multicore OCaml. It works in either regular OCaml with the
delimcc
library or in multicore OCaml, though more efficiently in the latter.Oleg strikes again.
where do I know algebraic effects from? as in, where is it applied in CS topics?
Here, basically. :) They’re an alternative to monads, formally a weaker (less general) abstraction, which therefore optimizes better. Specifically, unlike a monad, an algebraic effect can’t affect flow control except in certain very specific ways, which means there’s no explicit AST-like “backbone” of your code at runtime. So they can encapsulate side-effects (the State monad), but can’t encapsulate novel programming paradigms such as Prolog-style constraint-logic programming (the List monad).
I’m pretty sure algebraic effects can handle Prolog-style “search, accumulate successful results, backtrack on failure”. Check the slide titled “Eff: Dynamic Effects (2)” here.
Interesting… I am not sure I understand it, I’d need to play around a bit in a repl or something.