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.
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.If you are debugging code written by someone else, this should be worth the trouble of the additional line with the closing brace.
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 [EMAIL PROTECTED] http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]