Certain style issues don't concern me that much, such
as brace positions and naming conventions, as long as
consistency exists. Other style issues could lead to errors,
and I consider lack of braces one such.
So called style issues certainly vary in importance, from simple
personal taste (indent 3 spaces or 4) to something that is
absolute (no indentation what so ever, or---and I've actually
seen it done---random indentation). I understand your point
concerning the braces; leaving them out does allow one
additional error possibility when modifying code. In practice,
however, *IF* a reasonable style is rigorously adhered to,
missing braces when needed will stick out, and so won't occur.
The importance, here, is that the code is formatting using one,
reasonable style, and that that style does make the braces (or
the absence thereof) stick out.
if( condition )
doX();
doY();
doY() could easily be mistaken (by a quick reader) as
part of the condition,
So don't indent like that. My editor almost won't let me; I
have to do a lot of extra work to get it like that.
if( condition )
{ doX(); }
doY();
or variations therefore, the mistake is less possible.
I don't know. There's still an indentation error on doY(), and
I'm not sure I'd spot the fact that doY() isn't part of the if
immediately.
I might add that while not an absolute rule, like "use
indentation", I'd tend to reject styles which have code
following an open brace or before a closing brace, on the same
line. My rule is more or less that either:
-- the opening brace is on a line by itself, so you can't miss
it, or
-- you always use braces, so you don't have to see it to know
that it's there,
and
-- the closing brace is on a line by itself, or
-- it is always the first non white space, and anything which
follows is part of the "enclosing" statement (else of an
if/else, or while of a do/while).
I currently use the second of each of these rules, but I'd have
no trouble using the first if that's what my co-workers
preferred (and IMHO, omitting the braces is only acceptable if
you use the first).
I might add that regardless of which of the above rules I use,
the opening brace of a function or a class is always on a line
by itself. (Just like in K&R

.)