4 ms·
> single exit point rule, What makes it a "rule" or as sometimes said, a "law"? It's just a style, and it has pros and cons, cases where it helps, and cases
by SideburnsOfDoom 9y ago
> single exit point rule,
What makes it a "rule" or as sometimes said, a "law"?
It's just a style, and it has pros and cons, cases where it helps, and cases where it hinders.
- z3t4 9y agoIt's interesting when style becomes rules, the years goes by and no one challenge the "best practice", languages and frameworks might change, but the rules stay, for no good reason. So yeh, why only one return !?
- SideburnsOfDoom 9y ago> So yeh, why only one return !? Because it was a good idea in C. it's pretty much irrelevant to Java, JavaScript, C#, Ruby, Python, Rust etc. But the rules stay, for no good reason.
- wutbrodo 9y ago> It's interesting when style becomes rules, the years goes by and no one challenge the "best practice", FWIW, I would start making plans to leave a company where any significant amount of my colleagues followed rules like this without challenging them or being able to articulate their rationale.