xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter B. West" <pbw...@powerup.com.au>
Subject Re: FOP Style Guide (update)
Date Tue, 07 Jan 2003 23:59:31 GMT
Jeremias Maerki wrote:
> Since I've made the checkstyle.cfg file an integral part of our style
> guide I have to bring this up before changing:
> I'd like to add a line "checkstyle.ignore.braces = yes". This enables
> one line ifs like the following:
> if (isEnabled()) return true;
> Without this line, you have to write:
> if (isEnabled()) {
>     return true;
> }
> Please speak up if the change is unwelcome. Thanks.


The change is most welcome.

if (isEnabled()) {
     return true;

is absurd.  However, if I can do

if (isEnabled()) return true;

should I not be able to do

if (isEnabled() && someOtherVerboseCondition())
     return true;

and also

if (isEnabled)
     return false;

which is easier to read than

if (isEnabled()) doOoneLiner();
else return false;

Peter B. West  pbwest@powerup.com.au  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"

To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org

View raw message