Passing compound object for parameters
https://softwareengineering.stackexchange.com/questions/152965
-
04-11-2019 - |
Question
I have different data modules, which take a couple of parameters from a configuration list. Do you think it's ok to pass a configuration object as a whole module1(config)
and let the module pick what it needs, or should I rather pass the individual parameters module1(config.a, config.c, config.f)
?
The first case doesn't require change interfaces in case I need more configuration parameters, but the second case encapsules more?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with softwareengineering.stackexchange