0:00 / 0:00
After Life by Paweł Szulc at FP in the City Conference
Scala in the City
2K subscribers • 8 videos on Hallway
- Recommended by 1 person: 1 in engineering communities.
- Presented by Paweł Szulc
- An opinion. It argues one side of a question engineers disagree on.
Intermediate. Assumes working knowledge.
1.4K views6 years ago1 recommendation
Software designProgramming languagesHaskellDesign patternsSoftware architecture
Paweł Szulc shares how Klarna uses the MTL stack to achieve effect tractability and testability, comparing it to Free monad approaches.
After Life I'm a huge fan of Free monads, that's no secrete. For a very long time, I've been advocating writing maintainable software using one of the available "effects" library called Polysemy. At work, however, you can not always work with technologies you prefer. At Klarna we rely heavily on MTL stack. It took us some time and a couple of iterations, but I believe we've finally reached encoding, that - even though not perfect - gives us the majority of benefits typically found in Free-based solutions. Those (among many) are effects tractability, DSL-like encodings, coding to the interface, testability, "compiling" to the lower-level languages. In this talk, I will present our approach. You will not only learn how to program effects in MTL to get all the above mention benefits. We will also explore all "lower-level" machinery that was used. We will touch upon GeneralizedNewtypeDeriving and DerivingVia, MonadTrans and MonadTransControl, instances resolution in GHC, and many more. This talk is targeting beginner/intermediate Haskellers who want to gain knowledge on how to best leverage their favorite language in order to write beautiful, maintainable codeWhy it's here
1 person recommends thisWhat people say. Recommended for its practical, production-tested perspective on using MTL instead of Free monads for effect handling.