C style

utzoo!decvax!harpo!ihps3!houxi!houxq!dfm utzoo!decvax!harpo!ihps3!houxi!houxq!dfm
Tue Oct 26 08:59:14 AEST 1982

A rather radical difference of opinion here, so everybody start sharpening
your axes...  As has been pointed out, usual C practice makes braces very
visible.  I believe this is not a good idea.  The things which are made to
stand out should be the ones people need to see, not machines.  Braces
carry no information to the human reader -- he gets the nesting out of the
level of indentation (of course, I have no hard evidence to back this up,
so ...). The braces are just nasty gizmos the stupid compiler needs, so
tuck them out of the way at the end of a line, thus

	if (exp) {
		......; }
	while (exp)
	while (exp) {
		......; }

Note that contrary to a previous message you do not need braces lining up to
see where blocks begin and end.  You still draw a line down the page.  Another
advantage, to my obviously demented way of thinking, of this whole thing is
that there's less whitespace.  While lots of semantically blank lines and such
is nice on a big hard copy, I believe most of us are tied to nastly ~24 line
screens and need to see as much real information on one page as possible.

More information about the Comp.lang.c mailing list