C Indentation Survey Results (long...)

Henry Spencer henry at utzoo.UUCP
Thu Apr 18 04:32:44 AEST 1985


I find it quite amusing that the two following quotes appeared in the
same article (in the same paragraph, in fact):

>	...  Real open minded, aren't we Jim?  What ever
>	happened to programming style (as in everyone has their own...).
>	...  Here I thought one of strengths of C was it's
>	flexibility to differing programming styles.

>	I personally think
> 	that when it comes to readability in a program, a big part is
> 	consistency...

When it comes to readability in a program, consistency is indeed of
great importance -- consistency with what the programmer is used to.
And "programmer" doesn't mean just you, not for production software.
This implies using a standard programming style, not wandering off
on your own.

I used to have my own idiosyncratic indenting style.  Then we got
involved in V7 conversion, and I spent a lot of time reading and working
on other peoples' code, much of it done with K&R indenting.  Naturally
I used K&R indenting while doing this, because mixing indenting styles
within a single program is a major sin (readability and consistency,
remember).  It just got to be too much trouble to keep switching back
and forth, once I got used to K&R indenting.  It was much simpler to
be compatible with the rest of the world.  And I'm sure it's saved a
fair bit of hassle for other people reading and using my code; certainly
I got enough complaints about my odd style back in the old days.

"To be clear is professional; not to be clear is unprofessional."
					(Sir Ernest Gowers)
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list