u/roetlichin r/functionalprogramming • Recommends
Monads are everywhere... Maybe that's bad?
56K subscribers • 32 videos on Hallway
Intermediate. Assumes working knowledge.
29K views4 years ago1 recommendation
Programming languagesSoftware designFunctional programmingDesign patterns
Till Schröder discusses the challenges of using monads for handling effects and introduces algebraic effects as an alternative.
Till discusses the use of monads as a pattern for handling effects and chaining functions, with examples from various programming languages like JavaScript, Haskell, and C#. Monads, which can be thought of as a way to overload the semicolon, provide a more flexible way to handle errors and chain functions with effects. However, monads have challenges, such as the requirement for having the same error type for monadic computations and the complexity of implementing them in some languages. Till also introduces the concept of algebraic effects as an alternative to monads, which can handle side effects and exceptions in a more user-friendly way but are more complex to implement. Despite the challenges, Till expresses his fascination with the history of programming languages and his enjoyment of experimenting with various languages. Till Schröder till.red/ linkedin.com/in/till-schroeder/ Links, about haskell and monads: wiki.haskell.org/All_About_Monads okmij.org/ftp/Computation/IO-monad-history.html haskell.org/definition/haskell-report-1.0.ps.gz haskell.org/definition/haskell-report-1.3.ps.gz Algebraic Effects: overreacted.io/algebraic-effects-for-the-rest-of-us/ homepages.inf.ed.ac.uk/gdp/publications/alg_ops_gen_effects.… arxiv.org/abs/1807.05923 dl.acm.org/doi/abs/10.1145/3331545.3342595 Mentioned languages with algebraic effects: discuss.ocaml.org/t/ocaml-5-0-zeroth-alpha-release/10026 koka-lang.github.io/koka/doc/index.html unison-lang.org/ Chapters: Welcome by Magnus Sedlacek Thanks Ada Beat for sponsoring the video stream Introduction of Till Schröder Introduction Let’s get practical: Checking an email address Alternative: a result type This is a pattern (a monad) What does this mean? Monads are a way to overload the semicolon operator Monads are everywhere (JavaScript, C#, Rust, C++) Why are monads everywhere? Maybe that’s bad? A possible solution Effect wish list Algebraic effects But how could algebraic effects be implemented? That’s it – a broad overview of monads and algebraic effects Questions Video sponsor – Ada Beat adabeat.com/ If you want to spread functional programming and support the channel, buy something from the shop: funcprogsweden.myspreadshop.net/ #funcprogswedenWhat people say. Shared for its critical look at monads and the introduction of algebraic effects as an alternative.
u/roetlichin r/functionalprogramming • Recommends