Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe10.iad.POSTED!00000000!not-for-mail From: Owen Jacobson Newsgroups: comp.lang.java.programmer Message-ID: <2011110101533290344-angrybaldguy@gmailcom> References: <29cla79dh934epr5n27cghvupjk77mpuqr@4ax.com> <4eaab738$0$5147$e4fe514c@dreader17.news.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: code generation for the ternary operator User-Agent: Unison/2.1.5 Lines: 26 X-Complaints-To: abuse@UsenetServer.com NNTP-Posting-Date: Tue, 01 Nov 2011 05:53:32 UTC Date: Tue, 1 Nov 2011 01:53:32 -0400 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9330 On 2011-10-28 15:32:44 +0000, markspace said: > On 10/28/2011 7:07 AM, Jaap Droogers wrote: > >> On 28-10-11 15:46, schreef Roedy Green: >>> int count = lines *3; >>> if ( b1 ) count += 2; >>> if ( b2 ) count += 2; > >> Always use curly brackets: > > I prefer Roedy's version here, it's easier to read. Never say never, > and never say always. You can omit braces when they reduce code > readability. Having spent some time in languages with poor IDE support, I'd weaken that: you can omit braces, when they reduce code readability, if the language or its tools permits easy mechanical reformatting. While the Java ecosystem has some good code formatters, not every language is so fortunate. I've come to miss having a machine tell me if my formatting really matches my semantics, now that I don't have that on a daily basis. -o