Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Wojtek Newsgroups: comp.lang.java.programmer Subject: Re: Assigning void Date: Sat, 13 Oct 2012 13:31:58 -0700 Organization: A noiseless patient Spider Lines: 47 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="02a139954f423f27040ed3cd2ab90b3b"; logging-data="25467"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Kn0+nnMOm7QLzaXSURyJ1D8n+zJra0IE=" X-Newsreader: MesNews/1.08.03.00-gb Cancel-Lock: sha1:hQqiwkuMYhVFyjbCbCH+hC9rzlA= Xref: csiph.com comp.lang.java.programmer:19304 markspace wrote : > On 10/13/2012 12:28 PM, Wojtek wrote: > >> So questioning a design decision and trying to understand its rational >> is trolling? Really? > > > Yup, because there's no way anyone on this list could possibly answer that > question. You might try asking some of the language conferences or at > JavaOne. They might be able to tell you, or at least give you a rational. > > All I can personally say, and I'm pretty sure all anyone here can say, is > "Java is easy to read" is a goal, and allowing inline conditional is seen as > detrimental to that goal. Maybe. int a = (isTest()) ? 5 : 4; As opposed to int a; if (isTest()) a = 5; else a = 4; Both are perfectly readable, yet I find the ternary expression better. Or to strech it a little: int compare = (a > b) ? 1 : (a < b) ? -1 : 0; ------ int compare; if ( a > b ) compare = 1; else if ( a < b ) compare = -1; else compare = 0; -- Wojtek :-)