C style peeve
Larry Jones
scjones at sdrc.UUCP
Mon Mar 19 08:31:35 AEST 1990
In article <2205 at osc.COM>, jgk at osc.COM (Joe Keane) writes:
> [ return(2+2) instead of return 2+2 ]
>
> It's a shame the compiler lets them get away with it, and i think the extra
> parentheses should be strictly illegal. Unfortunately, for some reason the
> ANSI committee didn't like this suggestion.
Say what?!? The thing after the return keyword in an
>expression<. Expressions, last I heard, are allowed to contain
parentheses -- even redundant ones. Do you want to disallow all
redundant parentheses? Some redundant parentheses? What?
Personally, I find the idea morally repugnant. I happen to agree
with you that the parentheses on return statements are ugly and
people who use them should be severely teased, but trying to
change the language to enforce a particular style is way out of
line.
----
Larry Jones UUCP: uunet!sdrc!scjones
SDRC scjones at SDRC.UU.NET
2000 Eastman Dr. BIX: ltl
Milford, OH 45150-2789 AT&T: (513) 576-2070
"You know how Einstein got bad grades as a kid? Well MINE are even WORSE!"
-Calvin
More information about the Comp.lang.c
mailing list