Go to content

RubyConf 2021 - Using Monads for Elegant Error Handling by John Gallagher

Using Monads for Elegant Error Handling by John Gallagher Your app blows up in production. It's an outage and you're under pressure. You read the code. "How does this work? Why is this exception being caught here?" And so begins a long, stressful journey to understand how to fix your code. Rescuing exceptions is normalised in Ruby, but it's a clumsy way of reacting to error conditions and causes your code to be difficult to reason about. You'll refactor an existing app to use a functional style and see first hand how easy monads are to use and how they can make your code incredibly clean and expressive.

November 8, 2021