4 ms·
> That is, you should always return in an `if` branch. I've had seasoned team members criticizing that approach as possibly the worst mistakes a developer can
by rualca 6y ago
> That is, you should always return in an `if` branch.
I've had seasoned team members criticizing that approach as possibly the worst mistakes a developer can do.
Their rationale is that you needlessly increase the cyclomatic complexity of a module whenever you return early, and if you care about logging you'll already have to add multiple code paths just to emit them.