In Clean Code, it is written that the ideal number of arguments for a function is zero. The reasons why are explained and make sense. What I'm after is techniques to refactor methods with 4 or more arguments to solve this issue.One way is to extract the arguments into a new class, but that would surely lead to an explosion of classes? And those classes are likely to end up with names that violate some of the naming rules (ending with Data or Info etc)?Another technique is to make variables used by multiple functions a private member variable to avoid passing them, but that expands the scope of the variable, possibly such that it's open to functions that don't actually need it.Just looking for ways to minimise function arguments, having accepted the reasons why it's a good idea to do so.
Techniques for minimising number of function arguments
functions;clean code