Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9330
| From | Owen Jacobson <angrybaldguy@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Message-ID | <2011110101533290344-angrybaldguy@gmailcom> (permalink) |
| References | <29cla79dh934epr5n27cghvupjk77mpuqr@4ax.com> <4eaab738$0$5147$e4fe514c@dreader17.news.xs4all.nl> <j8ehuu$e58$1@dont-email.me> |
| Subject | Re: code generation for the ternary operator |
| Date | 2011-11-01 01:53 -0400 |
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
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
code generation for the ternary operator Roedy Green <see_website@mindprod.com.invalid> - 2011-10-28 06:46 -0700
Re: code generation for the ternary operator Jaap Droogers <JaapDroogers@unusable.meel.homelinux.net> - 2011-10-28 16:07 +0200
Re: code generation for the ternary operator markspace <-@.> - 2011-10-28 08:32 -0700
Re: code generation for the ternary operator Owen Jacobson <angrybaldguy@gmail.com> - 2011-11-01 01:53 -0400
Re: code generation for the ternary operator Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 06:25 -0700
Source code representation (was: code generation for the ternary operator). Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-01 09:41 -0700
Re: Source code representation Patricia Shanahan <pats@acm.org> - 2011-11-01 13:46 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-01 16:09 -0700
Re: Source code representation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:54 -0700
Re: Source code representation (was: code generation for the ternary operator). Gene Wirchenko <genew@ocis.net> - 2011-11-01 17:33 -0700
Re: Source code representation (was: code generation for the ternary operator). Roedy Green <see_website@mindprod.com.invalid> - 2011-11-02 01:19 -0700
Re: Source code representation (was: code generation for the ternary operator). Gene Wirchenko <genew@ocis.net> - 2011-11-02 09:42 -0700
Re: Source code representation (was: code generation for the ternary operator). Lew <lewbloch@gmail.com> - 2011-11-02 07:45 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 10:58 -0700
Re: Source code representation Gene Wirchenko <genew@ocis.net> - 2011-11-02 14:11 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 15:21 -0700
Re: Source code representation Gene Wirchenko <genew@ocis.net> - 2011-11-02 16:07 -0700
Re: Source code representation (was: code generation for the ternary operator). Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:52 -0700
Re: Source code representation (was: code generation for the ternary operator). Gene Wirchenko <genew@ocis.net> - 2011-11-02 09:47 -0700
Re: Source code representation (was: code generation for the ternary operator). Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-02 20:58 +0000
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 15:27 -0700
Re: Source code representation Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-02 23:18 +0000
Re: Source code representation Lew <lewbloch@gmail.com> - 2011-11-02 17:30 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 15:30 -0700
Re: Source code representation Gene Wirchenko <genew@ocis.net> - 2011-11-02 21:30 -0700
Re: Source code representation Lew <lewbloch@gmail.com> - 2011-11-02 22:07 -0700
Re: Source code representation Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 21:01 -0400
Re: code generation for the ternary operator Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 20:56 -0400
Re: code generation for the ternary operator rossum <rossum48@coldmail.com> - 2011-10-29 13:01 +0100
Re: code generation for the ternary operator Lew <lewbloch@gmail.com> - 2011-10-29 10:46 -0700
Re: code generation for the ternary operator Henk van Voorthuijsen <voorth@xs4all.nl> - 2011-10-28 08:05 -0700
Re: code generation for the ternary operator Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-10-28 15:41 +0000
Re: code generation for the ternary operator Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-28 10:31 -0700
Re: code generation for the ternary operator Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-10-29 03:24 +0200
Re: code generation for the ternary operator Wanja Gayk <brixomatic@yahoo.com> - 2011-10-29 00:23 +0200
Re: code generation for the ternary operator Lew <lewbloch@gmail.com> - 2011-10-29 10:50 -0700
Re: code generation for the ternary operator Wanja Gayk <brixomatic@yahoo.com> - 2011-11-01 13:36 +0100
Re: code generation for the ternary operator Michal Kleczek <kleku@poczta.onet.pl> - 2011-10-31 17:38 +0100
csiph-web