C Indentation Survey Results (long...)
geoff
geoff at burl.UUCP
Fri May 3 00:28:55 AEST 1985
> I am not arguing that difficulty of learning isn't a defect, by the way.
> Just pointing out that the K&R format is being maligned for the wrong
> thing. I won't go so far as to say "try it, you'll like it"... but I
> will say "if you try it seriously, you'll find it gets a lot easier".
>
> Henry Spencer @ U of Toronto Zoology
> {allegra,ihnp4,linus,decvax}!utzoo!henry
When I learned C four years ago, I followed the K&R format for commenting
code (i.e., brace at the end of the statement) and liked it. I found it was
relatively easy to use, read, etc. I changed my coding style when I went to
work (Bell Labs, Denver) to indent all blocks the same way K&R does functions.
I found that much easier to read and use because the opening brace is always
right above the matching closing brace. I find it is easier to spot
the opening brace this way when I go back over code. It does have the
liability that fewer meaningful lines appear on the screen, however. I have
used it now for two years and will continue to do so. The only other change
to the K&R commenting style I have adopted is to place all function arguments on
lines by themselves indented by two spaces.
geoff sherwood
burl!geoff
More information about the Comp.lang.c
mailing list