7 ms·
It seems foolish to take function length as a standard of good code. The example refactor looks horrible to me. How about the function can be read top to botto
by andrewchambers 11y ago
It seems foolish to take function length as a standard of good code. The example refactor looks horrible to me.
How about the function can be read top to bottom, doesn't mess with global state (unless it explicitly is documented as doing so), and has clear inputs and outputs. Who cares if it is 5,10 or 100 lines if it does that.