3 ms·
The correct size for functions is as short as possible without adding unneeded complexity, and no shorter. A piece of code deserves to be a function if you can
by jimrandomh 18y ago
The correct size for functions is as short as possible without adding unneeded complexity, and no shorter. A piece of code deserves to be a function if you can coherently explain what it does using only terminology from the problem domain, or if having it significantly simplifies other code. Otherwise, leave it inline.