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 Wed, 08 Jan 2003 13:23:36 GMT
Christian Geisert wrote:
> Peter B. West wrote:
>> 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)
>>     doOneLiner();
>> else
>>     return false;
>> which is easier to read than
>> if (isEnabled()) doOoneLiner();
>> else return false;
> And what about this:
> if (isEnabled())
>     doThis();
>     doThat();
> Yes, I like explicit braces.

For the above reason, which is the primary argument for them.  It's 
usual expression would, I think, involve changes to the code, so that 
what started as

if (isEnabled())


if (isEnabled())

which errors can be hard to find when the indentation confuses the 
issue.  Nonetheless, I prefer the braceless style for one-liners, 
because it is easier to read, IMO.  And it adds just a spice of danger.

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