5 ms·
Only if said functions are illogically split along non-obvious boundaries. Very frequently, though, I find I can break down concepts to two-three statements in
by Fellshard 5y ago
Only if said functions are illogically split along non-obvious boundaries. Very frequently, though, I find I can break down concepts to two-three statements in a way that makes it very concise. But also not a hard rule, because there are cases when long-and-drawn-out work as well.
- philosopher1234 5y agoEven logical splits impede readability, because they require tracking and navigation during reading. Every new API has a cost.
- Fellshard 5y agoI take this approach for internal divisions within the same file. For external APIs, you're operating under a completely different set of constraints. As I recall, similar advice was in the original Clean Code: context guides which principles you apply.
- xboxnolifes 5y agoI agree. If a function is only ever likely to be used in the one place it was pulled out of, you're probably better off just using a comment instead.
- dragonwriter 5y ago> Even logical splits impede readability, because they require tracking and navigation during reading. IME, most reading of code has a specific focussed goal for which logical splitting allows not reading lots of irrelevant code you'd have to read if it was a non-abstracted mass.