C coding style
24-Jul-89 17:50:38
Sb: #58369-C coding style
Fm: Richard Rae/SYSOP 76703,4253
To: Don Curtis/SYSOP 76703,4321
It's interesting what a mental block this is for me. I work with Chris on a
lot of C code. He writes in standard K&R style like you. I prefer George and
Dave's approach more or less (I indent 3, put braces on seperate lines, and
place the braces at the level of the block indent). Chris grumbles about my
"peculiar style" but doesn't have any trouble reading it. I grumble about his
style (but not loudly, because he's the one following the standard), but have
one HECK of a time following his code without drawing guidelines all over the
place.
Of course I try to keep in mind that he's doing it by the book and I'm the
maverick; it's my responsibility to read his style, not vice versa. But it
does make things difficult!
I agree with the comment about it being vital that all people on a team use the
same or similar styles. I also feel your point about wasted vertical space is
valid. I dunno, I realize I'm making work/trouble for myself, but the
structure just seems to be more visible to me when the opening and closing
braces are in the same column. When the opening brace is at the end of a
statement, I get into a "Where the heck does this block start!" mentality
(which is admittedly MY problem).
But then it goes along so nicely with all my others. 8D
Rick