Skip to content
0:00 / 0:00

#effmonad#cats#freermonad

Ben Hutchison - Getting Work Done with the Eff Monad in Scala

Compose Conference

2.9K subscribers • 28 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Ben Hutchison

Advanced. Deep dive for people who know the field.

4.6K views10 years ago1 recommendation

Programming languagesSoftware designScalaFunctional programmingDesign patterns

Ben Hutchison introduces the Eff monad in Scala, explaining how to use it for pure, type-safe, and extensible functional programming.

Ben Hutchinson's talk at Compose :: Conference in Melbourne, 2016. -- This talk introduces the Eff monad via Eff-cats Scala library, and gives a sense of how use it to solve practical programming problems. The Eff-cats library is an implementation of the Freer monad concept in Scala, developed by Eric Torreborre. It is inspired by Oleg Kiselyov's Haskell paper 'Freer Monads, More Extensible Effects' . Like Monad Transformer stacks and the Free monad, it provides an organising principle for the construction of pure functional programs. It has a number of desirable qualities: Purity: the construction of the program is decoupled from its interpretation Type-safety: Effects such as error handling or asychronicity are visible in the type signatures Flexible effect stacks: the final effect stack members can be varied without unduly affecting local code Performance: scales gracefully, as the program is stored as a Vector of continuations Flexible evaluation: effects interpretation can be reordered without rewriting the program This talk focuses on what code written using the Eff monad looks and feels like. It covers several common Eff 'effects' including Using Reader effects for dependency injection Using Either effects for error handling State effects for stateful computation It will also demonstrate some challenges that arise when using Eff and how to tackle them: Adding new effects to an existing program Mixing Eff-based and non-Eff modules together -- composeconference.org/2016-melbourne/day-one-program/

Why it's here

1 person recommends this

What people say. Recommended as an excellent presentation on using the Eff monad in Scala.

u/know_not_muchin r/scala • Recommends

Absolutely awesome presentation on Scala Eff Monad.