Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: underscore as keyword in Java 9 Date: Sun, 24 Sep 2017 11:25:43 -0000 (UTC) Organization: A noiseless patient Spider Lines: 20 Message-ID: References: Reply-To: avl@logic.at Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 24 Sep 2017 11:25:43 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="7e24db2c3675faa2e6b15ef99adc0ced"; logging-data="9801"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0yo5tfnzxc7CdaaaBMjUD" User-Agent: slrn/1.0.2 (Linux) Cancel-Lock: sha1:bZaFTE4Mum+CDshOeQfxEpUEP8k= Xref: csiph.com comp.lang.java.programmer:37457 Arne Vajhøj wrote: > On 9/23/2017 12:46 PM, j4n bur53 wrote: >> As long as Java doesn't have multi-returns, there >> will be not many use cases. For multi returns, if >> they were in the Java language, it could be offered >> as in the Go Programming Language: >> /* fetching the y coordinate of a 3D point */ >> _, y, _ := coord(p) > I suspect that Java will get that in version 10 or 11. > Reason: C# got it in version 7 (and Java and C# tend > to steal ideas from each other). > Syntax like: > (int v1,int v2) = M(); These speculations are entirely orthogonal to the point that "_" is taken away from the realm of identifiers, but might in future be used syntactically like throw-away identifiers - A use they sometimes already have - and this particular use is now being forbidden just before likely being re-enabled.