4 ms·
The difference is that 1 big functions naturally encodes the ordering and dependencies between things that happen inside - because it's linear and has nested br
by ajuc 5y ago
The difference is that 1 big functions naturally encodes the ordering and dependencies between things that happen inside - because it's linear and has nested braces.
10 or 20 small functions with no nesting inside still has all the complexity, but none of the structure to help programmer understand it.
Functions can be called in any order, any number of times, and you have to trace the full call-stack in your mind and keep it there to get the same understanding of what happens that you had just by looking at the linear code.
- deleted 5y ago[deleted]