3 ms·
I’d hazard that the 5 20 line functions are sometimes slightly less buggy, since the function signatures act as essentially an enforced comment on how the imple
by tekne 1y ago
I’d hazard that the 5 20 line functions are sometimes slightly less buggy, since the function signatures act as essentially an enforced comment on how the implementation is done and perhaps which state is accessed/modified. Versus mutable variables and if-statements in the larger function, that is.
- tyleo 1y agoI’d say more testable. I haven’t seen any metrics on amount of bugs vs composability of functions though. There are metrics on amount of bugs vs LoC. I have a personal preference towards the “more functions” approach too but I want to separate out my emotional feeling about what’s better vs what’s actually supported with data.