O'Reilly logo
  • joseph isaac thinks this is interesting:

So far all of the examples of removing argument order dependencies have been for situations where you control the signature of the method that needs to change. You will not always have this luxury; sometimes you will be forced to depend on a method that requires fixed-order arguments where you do not own and thus cannot change the method itself.

Imagine that Gear is part of a framework and that its initialization method requires fixed-order arguments. Imagine also that your code has many places where you must create a new instance of Gear. Gear’s initialize method is external to your application; ...

From

Cover of Practical Object-Oriented Design in Ruby: An Agile Primer

Note

Sometimes removing argument is impossible. For example your code may use some method from an external framework. In this case it is possible to use a wrapper method or even create a wrapper class to be able to remove the order dependency.