3 ms·
You're missing the point, it's not about executed code it's about concepts and simplicity. Sometimes people work too hard to make two functions with slightly d
by rnernento 10y ago
You're missing the point, it's not about executed code it's about concepts and simplicity.
Sometimes people work too hard to make two functions with slightly different objectives into a single complicated function. This can save lines of code since you aren't writing two similar functions. In general this is good practice but it's VERY common to take this too far, and it's very likely that the resulting complicated function will be MORE prone to bugs than the two simpler functions would have been.