[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pointer and internal/external symbol naming



Bjarke Hammersholt Roune wrote:

>This leads me, not very elegantly, on to pointer-variable naming. How about
>prefixing pointers with "p" ? So "char* name" becomes "char* pName", "char*
>obj" becomes "char* pObj" etc.

I don't like it. I don't care if you use that scheme, but I don't want to
have to use it myself.

>You will always be completely sure wheter or not a variable is a pointer or
>not, regardless of wheter or not you are looking at, or ever have looked at,
>its declaration.

For many things it's trivial to get the type from the variable name (a
variable named "count" is surely *not* a pointer, but some plain integer
type etc) and for the others scrolling perhaps one screen up to look at the
declaration isn't too much. After all - if you modify some code you should
know it well enough to tell the types of the variables without thinking.


	Christian
-- 

Drive A: not responding...Formatting C: instead