more about programming style

jack at boring.UUCP jack at boring.UUCP
Sat Jul 20 05:04:09 AEST 1985


In article <505 at scc.UUCP> steiny at scc.UUCP (Don Steiny) writes:
>
>	I think that standards of correctness are determined
>by the massive amount of existing C.   The ++ convention is
>easy for me to understand.   An example is variable names.
>People who come from other backgrounds than C programming
>often use long variable names, for instance:  
>
>	char	*name_array[];
>	int	name_array_index
>
>A C programmer might declare
>
>	char	*names[];
>	int	i;
This is clearly untrue. With the exception of COBOL programmers (who
aren't real programmers anyway:-) there is probably no difference
in the way people choose variable names. If there is, probably the
C programmers choose clearer names. Upper/lower case was in C right
from the start, remember?

Also, I think that after some years of experience, most people come
to a naming scheme where they use names like i,j,p and q 
for index variables and the like, and more
elaborate names for other things. It depends on taste whether you use
"names", "name_array", "UserNames", or whatever.
-- 
	Jack Jansen, jack at mcvax.UUCP
	The shell is my oyster.



More information about the Comp.lang.c mailing list