re: 10 CODING MISTAKES THAT MAKE YOUR CODE SMELL VIEW POST

TOP OF THREAD FULL DISCUSSION
re: "No argument is best" What's your rationale behind this? If a function isn't receiving any argument, then either of three things can be said about ...
 

I agree with this. Having a function with no arguments means the function only has a side-effect, or operates on variables external to the function. It is far better to pass in all parameters to the function than having a function that is entangled with external variables (including member object variables, which are "global" to the function, even if the function is a member function of the same object).

code of conduct - report abuse