4 ms·
My impression is that it is somewhat influence by the programming language. Code I've written have often needed so many variables to do its job that it is very
by jernfrost 11y ago
My impression is that it is somewhat influence by the programming language. Code I've written have often needed so many variables to do its job that it is very hard to split out small functions. But when you can use closures and higher order function easily, I find it easier to keep the size of functions down.
But I prefer Linux take on function size:
> The maximum length of a function is inversely proportional to the
complexity and indentation level of that function. So, if you have a
conceptually simple function that is just one long (but simple)
case-statement, where you have to do lots of small things for a lot of
different cases, it's OK to have a longer function.