C style peeve and knowing the rules
Kral
braun at drivax.UUCP
Thu Mar 29 02:13:25 AEST 1990
In article <19356 at megaron.cs.arizona.edu> robert at cs.arizona.edu (Robert
J. Drabek) writes:
[on the subject of parens in a return statement]
>
>Please, I know parenthesis are sometimes an aid in producing readable
>code and they are also clutter which can make for less-readable code.
I don't know.
return( a > b ? a : b ) ;
looks a lot more readable to me than
return a > b ? a : b ;
Maybe I'm a coding wimp, or maybe I shouldn't use complex statements, but I
have (what I think are sound) reasons for doing so, and the former is more
readable to me than the latter as it sets off the expression being returned.
--
kral 408/647-6112 ...amdahl!drivax!braun
"To surrender is to remain in the hands of barbarians for the rest of my life;
To fight is to leave my bones exposed in the desert waste"
- ancient chinese poem
More information about the Comp.lang.c
mailing list