smack Down
Diamond Member
- Sep 10, 2005
- 4,507
- 0
- 0
Originally posted by: degibson
I disagree strongly. Lots of objects and primitives can have integer-compatible syntax. I generally think of the 'n' as short for 'number' (some folks just use num), and m_ for member variables is very valuable for figuring out side effects.Originally posted by: smack Down
m_nThings the "m_n" adds nothing. The fact that a variable is an integer is usually self evident from the code.
as g_p_ please let me know where you work so that I know to avoid any company that came up with a coding notation for one of the worst practices ever.
Use of globals should be made explicit somehow. The very naming of a global variable should invoke pain. Hence the g_. You'll find when you try to disentangle code from its original home that it helps a LOT when use of globals is explicit (if you're unlucky enough to have code that uses globals in the first place).
There's a similar argument for pointers to be made: more pain with p_, etc.
Oh you think of n meaning number. Glad to have the degibson secret decoder ring. You know another very easy way to tell if a variable is a local variable or not? I will let you in on a little secret it local variables are declared in the method.
So not only does the maintenance programmer have to deal with your code using global pointers you're going to help them by making it painful?