Introduce Parameter Object

When parameters of the function/method seem to nicely go together or can represent an idea, concept or thing then these parameters are placed in an object.

Example:

  • searchPackages(startDate, endDate);
  • create(studentId, studentFirstName, studentLastName, studentCity...);

Dattatraya Kale

Aspiring agile software craftsman, clean code, polyglot, in love with different programming paradigm. I am on a never-ending journey towards mastery of software.

Leave a Reply