C Indentation Survey Results (not long...)

J. Shapiro jss at sjuvax.UUCP
Sun May 5 05:35:30 AEST 1985


Hopefully, this will end this sillyness.  It is not hard to write a
formatter for C.  It is especially a property of such a formatter that
it will be consistent, and it seems that consistency of style is
desirable.

I believe that this discussion has from the start confused 'style' with
'format'.  If you don't like my code, use M4 or some such to reformat it to
your taste.  Then your complaints about where to put braces and this,
that, or the other thing just don't hold.  This is a problem which has
been solved many times, and I am sure many people out there could
write formatters for the predominant versions of C format that people
seem to use.  There is something to say for sticking to the K&R format
for universality, but that seems to me to be a lesser problem, and
certainly not worth a raging battle.

On the otyher hand, I have more difficulty with code that is truly
obfuscated.  Much of the UNIX code, even if formatted as K&R (which
happens to be the format I learned) do it, is badly written, poorly
commented, and shows a certain sickening twist in the minds of the
authors.  I am not an OS hacker, and on those occasions when I am
obliged to look at UNIX code I am sickened by the lack of clarity of
the expression of the thoughts behind the code.  This, it seems to me,
is the real issue of 'style.' Not formatting style, but rather style
of expression.



More information about the Comp.lang.c mailing list