Coding Standards. was: a style question

Henry Spencer henry at zoo.toronto.edu
Sun Nov 18 11:50:30 AEST 1990


In article <6733 at uceng.UC.EDU> dmocsny at minerva.che.uc.edu (Daniel Mocsny) writes:
>...I can think of no reason to impose any
>particular indenting style on a programmer, because a quick run through 
>a standardizing beautifier will repair any idiosyncrasy.

Nonsense.  There are several reasons for not relying on beautifiers,
summed up well by the words written over a decade ago in the Indian Hill
style guide (with my footnote):

----------
This committee recommends that programmers not rely on automatic
beautifiers for the following reasons.
First, the main person who benefits from good program style is the
programmer himself.
This is especially true in the early design of handwritten algorithms
or pseudo-code.
Automatic beautifiers can only be applied to complete, syntactically
correct programs and hence are not available when the need for
attention to white space and indentation is greatest.
It is also felt that programmers can do a better job of making clear
the complete visual layout of a function or file, with the normal
attention to detail of a careful programmer\*f.
.FS
.IP \*F
In other words, some of the visual layout is dictated by intent
rather than syntax.
Beautifiers cannot read minds.
.FE
Sloppy programmers should learn to be careful programmers instead of
relying on a beautifier to make their code readable.
Finally, it is felt that since beautifiers are non-trivial programs
that must parse the source,
the burden of maintaining them in the face of the continuing evolution
of C is not worth the benefits gained by such a program.
----------
-- 
"I don't *want* to be normal!"         | Henry Spencer at U of Toronto Zoology
"Not to worry."                        |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list