Braces are not Compiler-Fluff.
T. William Wells
bill at twwells.uucp
Thu Jan 12 16:00:33 AEST 1989
In article <1616 at micomvax.UUCP> ray at micomvax.UUCP (Ray Dunn) writes:
: In article <292 at twwells.uucp> bill at twwells.UUCP (T. William Wells) writes:
: >
: >This, among style issues, is one of the few that is actually
: >decidable on objective grounds. Arguing it, without reference to
: >those objective grounds is pointless.
: >
:
: Unfortunately, not quite, as it presupposes that the *style* which is
: required to make the rest of the argument objective, is the One True Style.
Right you are. Well, almost. The presumption is that control
relationships should always be as self-evident as possible. And
given that presumption, my assertion follows.
: Thus (devils advocating), if one thinks that
:
: if (a) {b=2; c=2;}
:
: is acceptable style, then the conclusions that braces are not required and
: indentation is sufficient is far from objective.
Agreed. However, I try to avoid arguing things like: if one screws up
in this way, one can continue screwing up by doing...
: I was inclined to say that to *return* to a column format type approach
: would be retrograde, like returning to 80 column cards and Fortran (or, God
: Forbid, JCL). On reflection, however, on todays editing and output devices,
: "significant whitespace" is probably fully acceptable. The only real
: problem areas are with line-wraps, which will always occur, even with the
: best will in the world, and a set of conventions which through necessity
: would have to look like a current "style wars" definition.
:
: Now wouldn't it be fun getting *that* through a standards committee!
Actually, even C has a line continuation (more-or-less) standard: the
backslash at the end of a line. And the dpANS makes it standard.
With a consistent use of them, the conventions would not be so much
of a problem.
If one used a backslash to mean line continuation, as in the way the
dpANS specifies it, and had a preprocessor that inserted braces when
the non-continuation lines changed indentation levels, one would not
ever have to use braces. (Though there are cases where I'd like to
have the braces, to do special formatting in order to bring out some
characteristic of my code.)
---
Bill
{ uunet!proxftl | novavax } !twwells!bill
More information about the Comp.lang.c
mailing list