OOP private method parameters coding style
- by Jake
After coding for many years as a solo programmer, I have come to feel that most of the time there are many benefits to write private member functions with all of the used member variables included in the parameter list, especially development stage.
This allow me to check at one look what member variables are used and also allow me to supply other values for tests and debugging. Also, a change in code by removing a particular member variable can break many functions. In this case however, the private function remains isolated am I can still call it using other values without fixing the function.
Is this a bad idea afterall, especially in a team environment? Is it like redundant or confusing, or are there better ways?