|
|
|
|
|
by signa11
3647 days ago
|
|
Sure, but then there are more questions :) e.g. how many parameters ? 3, 4 ... ? what if they are of the same type ? would you change your numbers then ? users can get the order wrong etc. another thing : if you pass too many parameters, isn't that a hint to the fact that something is amiss ? edit-1 : fixed typo |
|
Variable naming will only add to that, as you can rename variables in the extracted methods for their local purpose.
If you have too many arguments you can package them up in a object/map/tuple of your choosing (depending on language).
(Reverting to local state would in my opinion increase confusion and decrease readability.)