C style peeve
Eric S. Raymond
eric at snark.uu.net
Tue Mar 20 02:27:06 AEST 1990
In <1990Mar18.005833.12944 at utzoo.uucp> Henry Spencer wrote:
> In article <2205 at osc.COM> jgk at osc.COM (Joe Keane) writes:
> >Here's my biggest C style peeve. For some reason, many C programmers insist
> >on always putting parentheses around return values...
> >So why do people do this? ...
>
> Partly because it used to be required, long ago, and partly because most
> of the other C control structures that contain expressions still require it
> and so people are used to it. There might also be some PL/I influence on
> some of the newcomers.
I was a `second-generation' C programmer -- I date back to the waning days of
V7. I have the quirk Mr. Keane dislikes, and I think it's because it `used to
be required' -- but I didn't know that when I was learning, I just emulated
the style of the good C code I had around as examples.
I use monocase function and variable names and avoid bitfields and enums for
the same reason, early habits that have just stuck with me. I suspect the same
is true of many C programmers besides myself. No PL/I hypothesis required!
My indentation style is still influenced by previous years of Pascal coding,
but that's another story...
--
Eric S. Raymond = eric at snark.uu.net (mad mastermind of TMN-Netnews)
More information about the Comp.lang.c
mailing list