Re:What I learned in 2017 writing Go
by riku_iki on Wednesday January 03, 2018 @05:08PM
(#16065731)
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.
[ Parent
| on HN ]
It 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).