I have a question regarding the use of function parameters.
In the past, I always wrote down my code so that all the information needed by the function was passed as a parameter. That is, global parameters are not used.
However, looking at other people's code, functions without parameters seem to be the norm. I should note that they are intended for private functions of a class and that the values ββthat would be passed as parameters are actually private member variables for this class.
This leads to a more streamlined code, and I'm starting to lean towards this for private functions, but would like other people's views.
eg.
Start();
Process();
Stop();
is tidier and more readable than:
ParamD = Start(paramA, ParamB, ParamC);
Process(ParamA, ParamD);
Stop(ParamC);
It destroys encapsulation in terms of method, but not in terms of class.