Do or don’t. There’s no try. Or is there? The power of monads explained. Sort of.

M1 Jun 13, 2025, 1:10 PM - 2:00 PM

Sander Hoogendoorn

Tools do not solve problems, thinking does.

One of the great things about being a programmer is that you never stop learning. Even after having programmed for almost 35 years, I still improve on the way I write code. Recently the way I write code changed once again when I started to apply monads and especially the Try class.

During a recent project, my team created a small library that ports the behavior of the Scala Try monad. Although at first this new monad didn't appeal to me, I soon really started to appreciate this style of programming, where we concatenate series of Map() and FlatMap() methods, using lambda’s, and avoiding abundant try-catch blocks, and many if statements and null checks.

In the meantime, I have contaminated many programmers with this style. Developers make it a sport to always start every method with e return statement. During this talk I’ll demonstrate the power of this simple monad, using many code examples (in Java, C# and TypeScript). Don't hesitate to join in.

Get inspiration & news from us

I agree that Cornerstone will send me news via e-mail