4 ms·
If you want to find specific place in large function, you will need to read all code line by line. If case of smaller functions, you can locate branch of intere
by riku_iki 9y ago
If you want to find specific place in large function, you will need to read all code line by line.
If case of smaller functions, you can locate branch of interest much faster if naming is good enough.
- jeremiep 9y agoIt really depends on the context of the problem being solved. Some problems become more complex when modularized like this. Splitting functions is basically adding indirections and spreading the context all over the place. For reusable tasks that works wonders, but for single-use functions that usually obfuscates the intent more than anything. I don't want to follow fifteen 10-lines one-use functions when I could read one 150-line function (which would most likely be a lot less due to less boilerplate).