P
phdscholar80
I have the habit of using the scope resolution operator whenever I use
global functions. My premise is that it improves readability by
helping someone who is looking at the code for the first time to grasp
at once that the function has global scope. I stretch this habit to
using the operator on C library functions as well. So I write ::memset
instead of memset and ::abs instead of abs. I vaguely remember hearing/
reading somewhere that it is encouraged practice to use fully
qualified names of STL elements, e.g. std::vector instead of vector.
Can someone verify this? All constructive comments are welcome.
global functions. My premise is that it improves readability by
helping someone who is looking at the code for the first time to grasp
at once that the function has global scope. I stretch this habit to
using the operator on C library functions as well. So I write ::memset
instead of memset and ::abs instead of abs. I vaguely remember hearing/
reading somewhere that it is encouraged practice to use fully
qualified names of STL elements, e.g. std::vector instead of vector.
Can someone verify this? All constructive comments are welcome.