Marcin Rzeźnicki – Using monads to enforce programming style your Boss likes (45 minutes)

It all started with my boss coming to me – “I don’t like EitherT”, he said. “All right, you should be using MonadError anyway” – I replied. “Oh, I don’t like that even more”. So I decided to help him out and everything went south. I ended up wrestling `Free` and `Cofree`, fighting stack overflows, benchmarking trampolines with flame graphs and, finally, rolled up my own monad which I call `Sealed`. I promise I’ll put a GitHub link, but for now I am not really proud of it. My boss and my company love it, though. So I thought I could share with you how to use monads to make your boss happy.
Topics I’ll cover:
– monadic error handling and flow control
– explore design and implementation of various existing monads in Scala,
– learn how to design a lawful monad from scratch and test it,
– how to deal with various issues that arise in the process: stack safety, performance implications,
– benchmarking with JMH and flame graphs


Leave a Reply

Your email address will not be published. Required fields are marked *