Say I'm developing a complex application. Within the member functions of an object, should I change only those objects that are passed to the member functions as parameters, or can I access and change any other objects that I have access to (for example, public or static objects)?
Technically, I know that everything that I have access to can be changed. I ask for best practice .
Sometimes it is difficult to pass an argument that I will receive and modify, especially if I know that the member function of the object will not be used by anyone other than me. Thank.
source
share