8th Light: Day 101

23 May 2016 . 8thlight . Comments #apprenticeship #8thlight #software #code-smells

Code smells: Long parameter list

More than three or four parameters for a method. - sourcemaking.com

Long parameter lists can be difficult to understand, especially if they continue to grow. While passing parameters is arguably usually a better solution than global state, it can be unwieldy if the number of parameters being passed exceeds three or more.

How to prevent:

The payoff is more maintainable, readable code that is less likely to contain duplications