Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37502
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: underscore as keyword in Java 9 |
| Date | 2017-09-27 20:02 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <oqhe73$889$1@gioia.aioe.org> (permalink) |
| References | (1 earlier) <oq635r$alr$1@news.albasani.net> <0b855e3b-6966-4f3b-bfdb-0863c64d7e39@googlegroups.com> <59c97591$0$2072$e4fe514c@newszilla.xs4all.nl> <oqc6om$19to$2@gioia.aioe.org> <59cbda67$0$20500$e4fe514c@newszilla.xs4all.nl> |
On 9/27/2017 1:05 PM, Silvio wrote: > On 26-09-17 02:24, Arne Vajhøj wrote: >> On 9/25/2017 5:30 PM, Silvio wrote: >> >> It is definitely shorter. >> >> I am not as convinced about more readable. > > The improved readability (as I conceive it) lies in the fact that there > is no need to match up two variable names. > > x => x.length > > requires my mind to note that the same identifier x is used twice: once > as formal parameter and once in the value expression. Having > > _.length > > makes that work redundant. But you have to be used to this to > immediately recognize the closure (lambda in Java speak). Since in > typical Scala source code the use of this shorthand is more frequent > than explicit closures one gets used to it really fast. I consider "readable by those used to it" to be "somewhat readable". But the problem may be very limited - I don't think those not having learned Scala will have much luck reading or writing Scala anyway. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
underscore as keyword in Java 9 Andreas Leitgeb <avl@logic.at> - 2017-09-23 11:58 +0000
Re: underscore as keyword in Java 9 j4n bur53 <janburse@fastmail.fm> - 2017-09-23 18:46 +0200
Re: underscore as keyword in Java 9 Arne Vajhøj <arne@vajhoej.dk> - 2017-09-23 21:01 -0400
Re: underscore as keyword in Java 9 Andreas Leitgeb <avl@logic.at> - 2017-09-24 11:25 +0000
Re: underscore as keyword in Java 9 j4n bur53 <janburse@fastmail.fm> - 2017-09-24 17:30 +0200
Re: underscore as keyword in Java 9 Arne Vajhøj <arne@vajhoej.dk> - 2017-09-24 18:24 -0400
Re: underscore as keyword in Java 9 Andreas Leitgeb <avl@logic.at> - 2017-09-24 23:27 +0000
Re: underscore as keyword in Java 9 Arne Vajhøj <arne@vajhoej.dk> - 2017-09-24 21:10 -0400
Re: underscore as keyword in Java 9 Andreas Leitgeb <avl@logic.at> - 2017-09-25 13:30 +0000
Re: underscore as keyword in Java 9 Eric Douglas <e.d.programmer@gmail.com> - 2017-09-25 08:07 -0700
Re: underscore as keyword in Java 9 lewbloch@gmail.com - 2017-09-25 13:21 -0700
Re: underscore as keyword in Java 9 Silvio <silvio@internet.com> - 2017-09-25 23:30 +0200
Re: underscore as keyword in Java 9 Arne Vajhøj <arne@vajhoej.dk> - 2017-09-25 20:24 -0400
Re: underscore as keyword in Java 9 j4n bur53 <janburse@fastmail.fm> - 2017-09-26 13:37 +0200
Re: underscore as keyword in Java 9 Silvio <silvio@internet.com> - 2017-09-27 19:05 +0200
Re: underscore as keyword in Java 9 Eric Douglas <e.d.programmer@gmail.com> - 2017-09-27 10:25 -0700
Re: underscore as keyword in Java 9 Silvio <silvio@internet.com> - 2017-09-27 23:02 +0200
Re: underscore as keyword in Java 9 Arne Vajhøj <arne@vajhoej.dk> - 2017-09-27 20:02 -0400
Re: underscore as keyword in Java 9 Eric Douglas <e.d.programmer@gmail.com> - 2017-09-28 05:11 -0700
Re: underscore as keyword in Java 9 Arne Vajhøj <arne@vajhoej.dk> - 2017-09-28 20:42 -0400
Re: underscore as keyword in Java 9 Sebastian <nowhere@nirvana.org> - 2017-09-27 20:26 +0200
Re: underscore as keyword in Java 9 Silvio <silvio@internet.com> - 2017-09-27 23:10 +0200
Re: underscore as keyword in Java 9 Andreas Leitgeb <avl@logic.at> - 2017-09-26 08:29 +0000
Re: underscore as keyword in Java 9 Silvio <silvio@internet.com> - 2017-09-27 19:08 +0200
Re: underscore as keyword in Java 9 Sebastian <nowhere@nirvana.org> - 2017-09-27 21:46 +0200
Re: underscore as keyword in Java 9 Eric Douglas <e.d.programmer@gmail.com> - 2017-09-27 06:53 -0700
Re: underscore as keyword in Java 9 Andreas Leitgeb <avl@logic.at> - 2017-09-27 15:59 +0000
Re: underscore as keyword in Java 9 Arne Vajhøj <arne@vajhoej.dk> - 2017-09-27 19:18 -0400
Re: underscore as keyword in Java 9 Daniele Futtorovic <da.futt.news@laposte.net> - 2017-09-28 11:41 +0200
csiph-web