Skip to content
0:00 / 0:00

#monads#algebraiceffects#directstyle

The Death of Monads? Direct Style Algebraic Effects

Impure Pics

3.8K subscribers • 7 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

29K views2 years ago1 recommendation

Programming languagesSoftware designFunctional programmingLanguage design and type systems

An explanation of monads, their limitations, and how direct style algebraic effects offer an alternative in functional programming.

The purpose of monads and their alternatives (old and new). For people who love monads, hate monads, and those who don’t get them. Make FP click by joining “How to think like a functional programmer” — impurepics.thinkific.com/courses/functional-thinking Hate watching videos? Check out the complementary article, which covers the same content: dev.to/zelenya 💡 Useful links: * Doing vs. Being: systemfw.org/posts/programs-as-values-II.html * Unison Abilities: unison-lang.org/docs/fundamentals/abilities/ * OCaml Effect handlers: v2.ocaml.org/manual/effects.html * OCaml Effect handlers: arxiv.org/pdf/2104.00250.pdf * Scala Capabilities: slideshare.net/Odersky/capabilities-for-resources-and-effect… * Delimited continuation primops (ghc proposal): github.com/ghc-proposals/ghc-proposals/blob/master/proposals… * Frank / Do be do be do: arxiv.org/abs/1611.09259 * On the expressive power of user-defined effects: arxiv.org/abs/1610.09161 * Effekt Language: effekt-lang.org/ * Koka Language: koka-lang.github.io/koka/doc/index.html #fp #functionalprogramming #unisonlang #haskell #scala #ocaml Subscribe to Impure Pics: bit.ly/impure-youtube *More Impure Pics* 🐣 twitter.com/impurepics 📦 impurepics.com 👕 merch.impurepics.com *Functional Alphabet book* 📗 Softcover: bit.ly/fp-abc-soft-cover 📘 Hardcover: bit.ly/fp-abc-hard-cover *Watch more Impure Pics* youtube.com/watch?v=c7FncTzvpUQ&list=UULF9-egQYdpElHtvVM-t9q… *About Impure Pics* FP Advocat. Distilling functional programming for the good of all Get in touch: zelenya.com Intro How we ended up in the world with monads Control flow The costs of monads Monads vs. Direct Style The worst of both worlds? Mixed styles The best of both worlds? Direct-style algebraic effects Control flow and call s tack The pros of direct-style algebraic effects The elephant in the pure room. RT Other limitations and unknowns What’s next and where to go Takeaways

Why it's here

1 person recommends this

What people say. Recommended as an accessible introduction to algebraic effects and how they compare to traditional monadic programming.

Moments people linked to

u/sideEffffECtin r/scala • Recommends

The Death of Monads? Direct Style Algebraic Effects

u/MysteriousGeniusin r/haskell • Mentions

On “Effect system as part of a language”

I assumed (can be wrong though) that Koka uses an effect system similar to \Unison abilities\, where effect is a property of a function, not the value. If that's the case, one thing that drives me away from these effect system is lack of referential transparency or "program are values" approach. I really like it! That's the way my brain works. Here's a bit of details on RT: [video (again, if Unison and Koka are similar in that regard).
1View on Reddit