Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Operators Date: Wed, 14 Sep 2016 20:23:32 -0400 Organization: Aioe.org NNTP Server Lines: 43 Message-ID: References: NNTP-Posting-Host: 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:35611 On 9/13/2016 10:51 PM, Roedy Green wrote: > On Tue, 13 Sep 2016 17:47:57 -0700 (PDT), Lew > wrote: >> https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.12 > > it says ? and : are both operators independently, contrary to net > convention. Obviously oracle is the authority. In 3.12 they authoritatively says 2. In 15.25 they authoritatively says 1. :-) Maybe they are not authoritatively the authority. :-) Or maybe there is a good explanation. Chapter 3 is about lexical structure. ?: is definitely two lexical elements or tokens. So: "38 tokens, formed from ASCII characters, are the operators." should possible be read: "38 tokens [in the lexical scan], formed from ASCII characters, are [used to create] the [37] operators" In general one should be very careful about interpreting specs like this. But in this case it actually makes 3.12: - consistent with 15.25 - consistent with common terminology Arne