Eff (programming language)

Last updated
Eff
Paradigms Multi-paradigm: functional, imperative
Family ML: Caml: OCaml
Designed by Andrej Bauer, Matija Pretnar
First appearedMarch 5, 2012;13 years ago (2012-03-05)
Stable release
5.1 / October 19, 2021;4 years ago (2021-10-19)
Implementation language OCaml
Platform x86-64
OS Cross-platform: macOS, Linux, Windows
License BSD 2-clause
Website www.eff-lang.org
Influenced by
OCaml

Eff is a general-purpose, high-level, multi-paradigm, functional programming language similar in syntax to OCaml which integrates the functions of algebraic effect handlers. [1] [2]

Contents

Example

effectGet_next:(unit->unit)optioneffectAdd_to_queue:(unit->unit)->unitletqueueinitial=handler|effectGet_nextk->(funqueue->matchqueuewith|[]->(continuekNone)[]|hd::tl->(continuek(Somehd))tl)|effect(Add_to_queuey)k->(funqueue->(continuek())(queue@[y]))|x->(fun_->x)|finallyx->xinitial;;

References

  1. "Eff Programming Language". Eff-lang.org. Retrieved 2019-11-18.
  2. Bauer, Andrej; Pretnar, Matija (March 2012). Programming with Algebraic Effects and Handlers (PDF) (Report). Department of Mathematics and Physics, University of Ljubljana, Slovenia.