4 ms·
The main point of small functions is they tend to be more readable. If they are too small then you get into code golf territory and loss readability. It's a bal
by jswizzy 9y ago
The main point of small functions is they tend to be more readable. If they are too small then you get into code golf territory and loss readability. It's a balancing act, you need to follow the Goldilocks principle when writing algorithms. Also, the author states at the end that small functions aren't bad so the title is misleading.
- falcolas 9y agoWell, there are small functions (that encapsulate a particular bit of behavior), and small functions (that encapsulate a repeated bit of code). The OP wants to get rid of the second, not the first. The problem is, they're both "small functions".