I would only consider this as bad practice if you have returned functions in complex complex functions, because itโs even harder for someone to understand the algorithm when viewing it. However, bad practice is to have large, long functions (they usually should be divided into several smaller functions).
In general, I would consider checking the parameters and the state at the beginning of the function and just go back to good practice, not even quite normal.
But be careful not to clog a function with several different return values โโin the main logic.
source share