Free monad or tagless final? How not to commit to a monad too early - Adam Warski
Functional programming is on the rise; monads are everywhere. But how to choose the right wrapper for the values which we manipulate (i.e. monad)? Quite often, the answer is far from obvious, and it’s useful to delay the decision as much as possible. Furthermore, picking a particular monad too early might only obscure important business logic details.
There are (at least) two ways to solve the problem, which are quite popular: free monads and the tagless final encoding. Both are equivalent in expressive power, but are radically different when it comes to code.
In this live-coding talk we’ll see how to transform a simple application which relies on Futures into more generic forms, using either the free monad or tagless final. We’ll see how these two representations compare in terms of boilerplate, readability, composability and stack-safety. We’ll also discuss which approach might be a better fit for selected use-cases.
Видео Free monad or tagless final? How not to commit to a monad too early - Adam Warski канала ScalaIO FR
There are (at least) two ways to solve the problem, which are quite popular: free monads and the tagless final encoding. Both are equivalent in expressive power, but are radically different when it comes to code.
In this live-coding talk we’ll see how to transform a simple application which relies on Futures into more generic forms, using either the free monad or tagless final. We’ll see how these two representations compare in terms of boilerplate, readability, composability and stack-safety. We’ll also discuss which approach might be a better fit for selected use-cases.
Видео Free monad or tagless final? How not to commit to a monad too early - Adam Warski канала ScalaIO FR
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Why the free Monad isn't free - by Kelley Robinson](https://i.ytimg.com/vi/U0lK0hnbc4U/default.jpg)
![scale.bythebay.io: Rob Norris, Functional Programming with Effects](https://i.ytimg.com/vi/po3wmq4S15A/default.jpg)
![Readers vs Constructors: Dependency Injection showdown by Adam Warski](https://i.ytimg.com/vi/AkOFubm-9L8/default.jpg)
![Tofu club. Что такое tagless final?](https://i.ytimg.com/vi/ZNK57IXgr3M/default.jpg)
![Paweł Szulc - Maintainable Software Architecture in Haskell (with Polysemy) - Lambda Days 2020](https://i.ytimg.com/vi/kIwd1D9m1gE/default.jpg)
![Akka HTTP & JSON: Integrating Spray, Circe and Jackson with Akka HTTP, with Scala | Rock the JVM](https://i.ytimg.com/vi/yU85EowqhY4/default.jpg)
![Basic streams and combinators in fs2 - Scala tutorial](https://i.ytimg.com/vi/TmhIabcu6Fs/default.jpg)
![How To Remember Everything When Learning How To Code](https://i.ytimg.com/vi/RpQDgSpS3RI/default.jpg)
![John A. De Goes at #ScalaUA - Thinking Functionally](https://i.ytimg.com/vi/-KA3BSdqYug/default.jpg)
![Free Monads—Paweł Szulc](https://i.ytimg.com/vi/ycrpJrcWMp4/default.jpg)
![Matt Parsons - I Command You to be Free! - λC 2017](https://i.ytimg.com/vi/Ej5FQtEgTBw/default.jpg)
![Monad transformers down to earth by Gabriele Petronella](https://i.ytimg.com/vi/jd5e71nFEZM/default.jpg)
![Tagless Final - Part 4.1 - Power to the Interpreters! ✊](https://i.ytimg.com/vi/5NxrVZvur_o/default.jpg)
![Scala: Beyond the basics with Christopher Batey](https://i.ytimg.com/vi/4QIgEMvUfIE/default.jpg)
![A Really Gentle Introduction to Asyncio](https://i.ytimg.com/vi/3mb9jFAHRfw/default.jpg)
![scale.bythebay.io: John A. De Goes, The Design of the Scalaz 8 Effect System](https://i.ytimg.com/vi/wi_vLNULh9Y/default.jpg)
![Using the Actor Pattern in Elixir - Nicolas Savois](https://i.ytimg.com/vi/LGgWATEmPho/default.jpg)
![A Tour of Scala 3 - Martin Odersky](https://i.ytimg.com/vi/_Rnrx2lo9cw/default.jpg)
![DRYing To Monads In Java8 by Dhaval Dalal at Functional Conf 15](https://i.ytimg.com/vi/_ykDhFYRaQ8/default.jpg)
![Using Tagless Final with laws - Scala tutorial](https://i.ytimg.com/vi/mkQLU7OzqYM/default.jpg)