Having only One Return statement is Better and More Safe

Stefan Schindler
7 min readApr 2, 2021

Functions in programming languages are incredibly useful: They are designed to take input parameters, do something with them, and output a result. This conforms to the well-known IPO model (Input, Process, Output). However some developers tend to interrupt that process, making it harder to follow and thus understand a function, and risking evil and nasty bugs.

Let’s see why not always all roads lead to Rome.

--

--

Stefan Schindler

Software developer, husband, dad. Passion for Python, Vim, proper HTML, weight training, motorcycling.