Unnecessary parenthesis
Michael T Sullivan
sullivan at vsi.UUCP
Sat Jul 9 05:36:20 AEST 1988
In article <2550075 at hpisod2.HP.COM>, decot at hpisod2.HP.COM (Dave Decot) writes:
>
> Return is not a function call, and it shouldn't look like one.
>
> > > return(0); /* one wonders why the () are there */
> >
> > 1) Because it looks consistent.
>
> With what? Why do you want to make it easier to confuse function calls
> with statements that don't come back?
Like exit() or abort()???
> I see no reason to add further confusion by making flow control look like
> a function call. I use "return e;" because it's less cluttered and more
> distinct.
When I have something like:
return(a == b ? c : d);
I think it looks better than:
return a == b ? c : d;
Maybe if return had a space between the paren like while, for, and switch
everybody would be happy (and there'd be peace in the world, and no more
smog, ...). I think I'll try that for a while and see how it goes.
--
Michael Sullivan {uunet|attmail}!vsi!sullivan
V-Systems, Inc. Santa Ana, CA sullivan at vsi.com
ons, workstations, workstations, workstations, workstations, workstations, work
More information about the Comp.lang.c
mailing list