1. 14

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.”

  1. 4

    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.

    1. 5

      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.

    2. 4

      Oleg strikes again.

      1. 2

        where do I know algebraic effects from? as in, where is it applied in CS topics?

        1. 7

          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).

          1. 4

            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.

            1. 2

              Interesting… I am not sure I understand it, I’d need to play around a bit in a repl or something.