Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Simple if-exercises Date: Fri, 03 Apr 2015 07:38:08 -0400 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 3 Apr 2015 11:37:19 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="7526"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192Vom9gsu1sxdv/7g7btno" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: Cancel-Lock: sha1:Q/6tIaH+hzZikaQzcDKTDDB+6Lw= Xref: csiph.com comp.lang.java.programmer:31447 On 4/3/2015 2:29 AM, Volker Borchert wrote: > Jeff Higgins wrote: > >> Why don't we have a Quinary operator? >> x ? y LT : EQ : GT > > One of those occasions where "newer" is not "better". > > I _do_ miss FORTRAN's three-way IF statement. I miss it, but very rarely. It's nice in a binary search, and it's nice in heapsort, but I can't recall other contexts that made me wish it were still around. An ironic oddity: In the numerical applications for which FORTRAN is justly famous, the three-way IF is almost never the right thing to use! You don't want "negative,zero,positive" but "noticeably negative,close to zero,noticeably positive." -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM