|
|
|
|
|
by sfn42
1056 days ago
|
|
If the function grows like you describe it's because the developers are doing bad work. Instead of extending the function into a monster it should be split appropriately according to the new requirements. In some cases it may end up being multiple classes and that's fine. What isn't fine is cramming multiple classes worth of complexity into one function just because it almost did what you needed. |
|
Exactly. Evolving a nice function into one that accepts lots of arguments is a product of the same mindset that copy-pastes code.