Returns

Use a single return in each method, so it is always possible to predict the path to the exit.

When the code becomes more complex it is harder to know under which conditions the program will reach a return or another.

This is related to the "Single Entry, Single Exit" (SESE) principle.

Last updated