2 ms·
> They generally make the function smaller, that's what guard clauses are for. My point is: frequently, one wants to extract a part from the middle of a functi
by lmm 13y ago
> They generally make the function smaller, that's what guard clauses are for.
My point is: frequently, one wants to extract a part from the middle of a function to make a new function. This is very easy (and can usually be done automatically) unless said part contains a return.
- gnaritas 13y agoSuffering the unbearable burden of a single exit point just so your refactoring tool has an easier time breaking up the code isn't a trade worth making, especially when it's the single exit point that's probably making it too long to begin with.