commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [lang] Code clean up of "return (value);"?
Date Sat, 09 Oct 2004 09:48:41 GMT
I always tend to have the extra brackets in return statements for
expressions. It just clarifies the look for me.

I don't believe we should change existing code, just let each class evolve
according to each developer. The only time we should change formatting is if
the current code is way far from out standards.

Stephen

----- Original Message -----
From: "Gary Gregory" <ggregory@seagullsoftware.com>
I agree with Craig WRT to non-return expressions (if, while) and I also
personally prefer being more explicit in if statements rather than
relying solely on operator priorities. This is why I am only commenting
on return statements.

In the case of return statements, I do not see any value in extra
parentheses. So, for [lang] I am pushing for their removal. I have
already done so for [codec] but I do not want to propose anything for
other projects as I am active only on [lang] and [codec].

Gary

> -----Original Message-----
> From: Craig McClanahan [mailto:craigmcc@gmail.com]
> Sent: Friday, October 08, 2004 17:36
> To: Jakarta Commons Developers List
> Subject: Re: [lang] Code clean up of "return (value);"?
>
> On Fri, 8 Oct 2004 17:15:08 -0700 (PDT), David Graham
> <grahamdavid1980@yahoo.com> wrote:
> > This shows up in Struts quite a bit and I think Craig uses this
> > convention.  I don't personally care for it because Java needs less
> syntax
> > rather than more :-).
> >
>
> It's a personal preference of mine to clearly highlight "this is an
> expression".  I wouldn't be bothered by seeing it go away from return
> statements -- but I'm still going to put in "redundant" parentheses in
> my "if" statements rather than relying on the priority of the various
> operators :-).
>
> > David
>
> Craig
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message