Longer functions, higher productivity, less defects…

software developers should be wary of breaking their code into too small pieces, and actively avoid introducing very short (1-3 lines) functions when given the choice. At the very least unnecessary single-line functions (ie. excluding getters, setters etc.) should be all but banned.

Source: Very short functions are a code smell – an overview of the science on function length – Software by Science

%d bloggers like this: