MENU

Fun & Interesting

The Death of Monads? Direct Style Algebraic Effects

Impure Pics 21,273 10 months ago
Video Not Working? Fix It Now

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” — https://impurepics.thinkific.com/courses/functional-thinking Hate watching videos? Check out the complementary article, which covers the same content: https://dev.to/zelenya 💡 Useful links: * Doing vs. Being: https://systemfw.org/posts/programs-as-values-II.html * Unison Abilities: https://www.unison-lang.org/docs/fundamentals/abilities/ * OCaml Effect handlers: https://v2.ocaml.org/manual/effects.html * OCaml Effect handlers: https://arxiv.org/pdf/2104.00250.pdf * Scala Capabilities: https://www.slideshare.net/Odersky/capabilities-for-resources-and-effects-252161040 * Delimited continuation primops (ghc proposal): https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0313-delimited-continuation-primops.rst * Frank / Do be do be do: https://arxiv.org/abs/1611.09259 * On the expressive power of user-defined effects: https://arxiv.org/abs/1610.09161 * Effekt Language: https://effekt-lang.org/ * Koka Language: https://koka-lang.github.io/koka/doc/index.html #fp #functionalprogramming #unisonlang #haskell #scala #ocaml Subscribe to Impure Pics: https://bit.ly/impure-youtube *More Impure Pics* 🐣 https://twitter.com/impurepics 📦 http://impurepics.com 👕 http://merch.impurepics.com *Functional Alphabet book* 📗 Softcover: https://bit.ly/fp-abc-soft-cover 📘 Hardcover: https://bit.ly/fp-abc-hard-cover *Watch more Impure Pics* https://www.youtube.com/watch?v=c7FncTzvpUQ&list=UULF9-egQYdpElHtvVM-t9qDWQ *About Impure Pics* FP Advocat. Distilling functional programming for the good of all Get in touch: https://zelenya.com 0:00 Intro 0:08 How we ended up in the world with monads 2:42 Control flow 4:56 The costs of monads 6:52 Monads vs. Direct Style 7:55 The worst of both worlds? Mixed styles 8:23 The best of both worlds? Direct-style algebraic effects 11:55 Control flow and call s tack 12:53 The pros of direct-style algebraic effects 14:12 The elephant in the pure room. RT 15:22 Other limitations and unknowns 15:57 What’s next and where to go 16:55 Takeaways

Comment