I was wondering how many ways you can construct return values from a function that returns either something or nothing depending on a simple piece of logic, easier to understand from my examples above ...
One of the pet peeves of a certain code reviewer on a job I had some time ago was using "return" from inside a conditional. As a result, out of habit, I never return anywhere but at the end of the ...