Aviva Directory » Computers & Internet » Programming » Eff

In this segment of our computer programming language guide, we'll focus on the Eff programming language.

First appearing on March 5, 2012, the functional programming language was designed by Andrej Bauer and Matija Pretnar. As of this writing (2024), the most recent stable release was on October 19, 2021. It is available under the BSD 2-clause License.

Eff is built on the foundation of algebraic effect handlers. Unlike traditional languages, Eff provides. handlers for any computational effect, including not only exceptions but output redirection, state modifications, asynchronous threads, and others.

Its syntax is similar to that of OCaml, which integrates the functions of algebraic effect handlers.

In Eff, effects are first-class citizens and can be seamlessly combined without the need for monad transformers or reshuffling the entire program. For example, exception handlers are a specific instance of effect handlers, and programmers can silence standard output, redirect it, or rearrange it, while state modifications can be prevented or grouped in transactions.

Eff allows programmers to define their own effects. They can simply declare a choice operation and start writing nondeterministic programs. Later, they can write a handler that computes a single possible result, an optimal result, or a list of all results.

Currently, Eff serves as a playground for testing new concepts in programming languages, especially those related to computational effects, but it is not recommended for production uses due to its limited library support, minimal documentation, and its evolving nature.

The major influence for Eff was OCaml, another functional programming language whose syntax is similar. However, Eff diverges significantly in its approach to effects, embracing algebraic effect handlers, while OCaml uses monads.

Eff is useful for exploring computational effects, but its practical adoption remains limited.



Recommended Resources

Search for Eff on Google or Bing