RFR: jsr166 jdk9 integration wave 12 (original) (raw)

Paul Sandoz paul.sandoz at oracle.com
Fri Nov 18 16:58:39 UTC 2016


On 18 Nov 2016, at 08:46, Martin Buchholz <martinrb at google.com> wrote:

On Thu, Nov 17, 2016 at 11:17 PM, Remi Forax <forax at univ-mlv.fr <mailto:forax at univ-mlv.fr>> wrote: ----- Mail original ----- > De: "Martin Buchholz" <martinrb at google.com <mailto:martinrb at google.com>> > À: "Paul Sandoz" <Paul.Sandoz at oracle.com <mailto:Paul.Sandoz at oracle.com>> > Cc: "core-libs-dev" <core-libs-dev at openjdk.java.net <mailto:core-libs-dev at openjdk.java.net>> > Envoyé: Vendredi 18 Novembre 2016 05:29:12 > Objet: Re: RFR: jsr166 jdk9 integration wave 12 [..] >> 317 c.forEach(e -> addLast(e)); >> >> this::addLast, up to you which you prefer >> >> > Meh. Left as is; another vote could tip to the other side. > > I like the rule that says, use a method reference if you can and a lambda otherwise. so i vote for this::addLast :) Done! Seems like a good rule to adopt.

And FWIW you will get slightly less byte code in the compiled class, because there is no lambda body to de-sugar.

Paul.



More information about the core-libs-dev mailing list