3 ms·
It should be easier to reason about code when there is exactly one exit from a block. I am not sure this really applies when we are talking about guard clauses
by mmcgaha 9y ago
It should be easier to reason about code when there is exactly one exit from a block. I am not sure this really applies when we are talking about guard clauses that are not deeply nested. So loop breaks and other shallow returns are OK, and can be good.