3 ms·
Then extract functions until it's small, a.k.a. refactoring.
by mseepgood 14y ago
Then extract functions until it's small, a.k.a. refactoring.
- marshray 14y ago...and if you end up needing to pass 20 variables via reference for state?
- masklinn 14y agohttp://www.refactoring.com/catalog/introduceParameterObject.html http://www.refactoring.com/catalog/introduceParameterObject....
- marshray 14y agoYou have a group of parameters that naturally go together. ...when you have a bunch of methods that call each other, all of which have a clump of parameters that need this refactoring. In this case you don't want to apply Introduce Parameter Object because it would lead to lots of new objects There are times when this transformation yields simpler code, there are times when it makes things more complex, and there are a lot of cases in between where it's a judgment call.