In this talk, presented at PyConDE/PyData Berlin 2025, I take a critical look at a fundamental yet often misunderstood programming feature: exceptions. Titled “Why Exceptions Are Just Sophisticated Gotos – and How to Move Beyond”, the talk explores the historical context of exception handling, its parallels with the infamous goto statement, and why this comparison matters today.

We trace the evolution from early control flow constructs to structured programming, showing how exceptions—initially introduced as a cleaner alternative—can lead to hidden control paths, harder-to-debug code, and performance issues when misused.

As a modern alternative, the talk introduces result types, which are increasingly favored in languages like Rust, Haskell, and Golang for their clarity and predictability. We look at how these ideas translate into Python using the returns package, demonstrating practical examples that make error handling more explicit and robust.

This session is ideal for intermediate to advanced Python developers interested in writing more maintainable code and embracing functional error-handling patterns.

Check out the video of the presentation and the slides of my talk.


Comments

comments powered by Disqus