re: Code Smell — Too Many Parameters VIEW POST


Because of JavaScript, I feel that one Object parameter might be preferred, rather than multiple, or varargs.

It makes ordering of params not to matter.


I think you may have missed the point of the post. :)


How so?

If I see parameters like studentID, studentName, studentAge, etc. all of these could be grabbed from a single Student object. Even dependencies like classes and fees should be retrievable by the same object via references.

A single object as parameter, where applicable, makes the whole function easier to structure

Code of Conduct Report abuse