3 ms·
I am saying you indeed should have descriptive function names. I also agree that if the function's name leaves something to be desired then it should be commen
by matvore 5y ago
I am saying you indeed should have descriptive function names.
I also agree that if the function's name leaves something to be desired then it should be commented.
You are conflating function names--global and relatively non-contextual--with variable names--which have limited scope and rely on the function name for their meaning.
In the setColor example, I would use setColor for the function name and c for the parameter name (with the caveat that C language doesn't have method names, so my reasoning about context has limited applicability to non-C languages)