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 15:54:40 GMT
J.Pietschmann wrote:
> Peter B. West wrote:
> 
>> if (isEnabled()) {
>>     return true;
>> }
>>
>> is absurd.
> 
> 
> Not necessarily. I it *much* easier to add a
> System.out.println() to this than to either
> 
>   if (isEnabled())    return true;
> or
>   if (isEnabled())
>     return true;

Agreed.

> 
> If you are debugging code written by someone else,
> this should be worth the trouble of the additional
> line with the closing brace.

When I add the println, I also add the braces.  The motivation for 
eliminating the braces is the readability of the code when there is only 
one line, which is a very frequent occurrence.  It comes to a balance of 
motives and requirements.

I like to have as much code as possible in my viewing window, but I also 
like to scatter blank lines about - readability again, to this jaundiced 
eye.  These conflicting demands are one reason I'm so fond of compact 
one-liners.

Peter
-- 
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


Mime
View raw message