> De: "Kevin Bourrillion"
> À: "Remi Forax"
> Cc: "daniel smith" , "amber-spec-experts"
>
> Envoyé: Mardi 9 Octobre 2018 21:39:07
> Objet: Re: New JEP: Concise Method Bodies
> On Tue, Oct 9, 2018 at 12:34 PM < [ mailto:fo...@uni
Precisely so. Records form the sweet spot where construction protocol,
deconstruction protocol, equality and hashCode protocol, and
representation are identical. The probability that you would also want
to use the state vector as a dictionary-order comparator is very, very
small.
(Please, l
v.fr wrote:
*De: *"Kevin Bourrillion"
*À: *"daniel smith"
*Cc: *"Remi Forax" , "amber-spec-experts"
*Envoyé: *Mardi 9 Octobre 2018 20:48:10
*Objet: *Re: New JEP: Concise Method Bod
> De: "Kevin Bourrillion"
> À: "Remi Forax"
> Cc: "daniel smith" , "amber-spec-experts"
>
> Envoyé: Mardi 9 Octobre 2018 21:03:42
> Objet: Re: New JEP: Concise Method Bodies
> I do like that feature, but, aren't statics
On Tue, Oct 9, 2018 at 12:15 PM wrote:
> We have a rich API for building Comparators. I would expect most
> non-legacy implementations of Comparable to implement their 'compareTo'
> method by delegating to a Comparator. And you don't want to build the
> Comparator each time the 'compareTo' method
> De: "daniel smith"
> À: "Remi Forax"
> Cc: "amber-spec-experts"
> Envoyé: Mardi 9 Octobre 2018 20:43:03
> Objet: Re: New JEP: Concise Method Bodies
>> On Oct 9, 2018, at 12:00 PM, Remi Forax < [ mailto:fo...@univ-mlv.fr |
>> fo...@u
t;
> *De: *"Kevin Bourrillion"
> *À: *"daniel smith"
> *Cc: *"Remi Forax" , "amber-spec-experts" <
> amber-spec-experts@openjdk.java.net>
> *Envoyé: *Mardi 9 Octobre 2018 20:48:10
> *Objet: *Re: New JEP: Concise Method Bodies
>
>
> De: "Kevin Bourrillion"
> À: "daniel smith"
> Cc: "Remi Forax" , "amber-spec-experts"
>
> Envoyé: Mardi 9 Octobre 2018 20:48:10
> Objet: Re: New JEP: Concise Method Bodies
> On Tue, Oct 9, 2018 at 11:43 AM Dan Smith < [ mail
> On Oct 9, 2018, at 12:00 PM, Remi Forax wrote:
>
> Aside, from the semantics point of view, this is a very bad example,
> implementing Comparable means you have a natural order for the class and
> taking a Comparator as parameter means there is no natural order.
Note that 'comp' has an initi
Hi Daniel,
- Mail original -
> De: "daniel smith"
> À: "amber-spec-experts"
> Envoyé: Mardi 9 Octobre 2018 18:31:48
> Objet: Re: New JEP: Concise Method Bodies
>> On Oct 8, 2018, at 12:14 PM, Dan Smith wrote:
>>
>> - Type-qualified
> On Oct 8, 2018, at 12:14 PM, Dan Smith wrote:
>
> - Type-qualified method ref: if you don't pass 'this' to the method, you're
> throwing it away. Static utility methods could be referenced with this form.
> Methods of the current class/supers could be referenced, too, but 'this::foo'
> and '
> On Oct 8, 2018, at 10:50 AM, Brian Goetz wrote:
>
> class UnmodifiableFooWrapper implements Foo {
> private final Foo underlying;
>
> public void fooMethod1(args) = underlying::fooMethod1;
> public int fooMethod2(args) = underlying::fooMethod2;
> public long
The challenge seems to be finding the right intuition.
Yep. The intent is to suggest that the behavior on the RHS is a
"constant" of some sort with respect to some context, so that
"assigning" it is definitional rather than mutative. But this is still
fuzzy, so we need to narrow this down
> De: "daniel smith"
> À: "amber-spec-experts"
> Envoyé: Samedi 6 Octobre 2018 01:22:25
> Objet: Re: New JEP: Concise Method Bodies
>> On Oct 5, 2018, at 4:18 PM, Brian Goetz < [ mailto:brian.go...@oracle.com |
>> brian.go...@oracle.com ] > wro
> On Oct 5, 2018, at 4:18 PM, Brian Goetz wrote:
>
>> Can the expression before the :: refer to any method parameters? Of course,
>> it would still expect to pass those parameters into the method, so it's
>> weird to have the same parameter used in both ways, but does it make sense
>> to forbi
> De: "Brian Goetz"
> À: "Kevin Bourrillion" , "Alex Buckley"
>
> Cc: "amber-spec-experts"
> Envoyé: Samedi 6 Octobre 2018 00:18:54
> Objet: Re: New JEP: Concise Method Bodies
>> Can the expression before the :: refer to any me
Can the expression before the :: refer to any method parameters? Of
course, it would still expect to pass those parameters into the
method, so it's /weird/ to have the same parameter used in both ways,
but does it make sense to forbid it?
Yes, it makes sense to forbid. Here's why.
The
> De: "Kevin Bourrillion"
> À: "Alex Buckley"
> Cc: "amber-spec-experts"
> Envoyé: Vendredi 5 Octobre 2018 22:25:28
> Objet: Re: New JEP: Concise Method Bodies
> Oops - sorry for the rapid-fire responses here. A couple more points while
> th
> De: "Kevin Bourrillion"
> À: "Alex Buckley"
> Cc: "amber-spec-experts"
> Envoyé: Vendredi 5 Octobre 2018 22:03:53
> Objet: Re: New JEP: Concise Method Bodies
> On Mon, Sep 24, 2018 at 10:17 AM Alex Buckley < [
> mailto:alex.buck...@orac
Hi all,
I have published a public amber repo for the concise method bodies JEP.
It can be found at [1], branch: concise-method-declarations. Also as
suggested by Brian I have created a new finder, see [2]. Using it I have
got some stats on the number of methods in the JDK that could
potential
On 9/21/2018 4:07 PM, Kevin Bourrillion wrote:
"The method reference form can use most kinds of method references after
the = sign: static and unbound method references, bound method
references (if the receiver *variable* is in scope for the method
declaration)"
Can we still bind to any expressi
Hello, Kevin!
Yes, it's a little bit hard to migrate between block body - expression body
- method reference. However we already have this problem in lambdas, and we
are living with this without much hassle. That's because every decent IDE
can convert between these forms for you.
Btw IDEA has an
I think moral-hazard arguments also deserve a bit of thought.
I was thinking moral hazard too, but in the other direction. The higher
the per-method overhead, the more likely people are to write poorly
factored methods and to duplicate code, because declaring another method
feels too heav
On 9/20/2018 12:05 PM, Kevin Bourrillion wrote:
In this case, I think the `=/` /form /might/ also clear that bar because
of the automatic parameter pass-through. But I cannot currently see how
the `->` form comes close to clearing it.
(Data welcome.)
Ooh, you know the magic words! Okay, w
On 20/09/18 20:05, Kevin Bourrillion wrote:
In this case, I think the `=/` /form /might/ also clear that bar
because of the automatic parameter pass-through. But I cannot
currently see how the `->` form comes close to clearing it.
Not sure I get it - surely every getter might benefit form thi
On Wed, Sep 19, 2018 at 2:44 PM Alex Buckley
wrote:
On 9/19/2018 12:31 PM, Kevin Bourrillion wrote:
> > In other cases, it looks like you're gaining a very /small/ amount of
> > syntactic conciseness (mostly omitting `return`) and not much else? Is
> > there any actual /conceptual/ simplicity or
Hi Kevin,
On 9/19/2018 12:31 PM, Kevin Bourrillion wrote:
In other cases, it looks like you're gaining a very /small/ amount of
syntactic conciseness (mostly omitting `return`) and not much else? Is
there any actual /conceptual/ simplicity or clarity being gained?
Let me focus on the single ex
e removed
Rémi
- Mail original -
De: "mark reinhold"
À: "Alex Buckley"
Cc: "amber-spec-experts"
Envoyé: Mercredi 19 Septembre 2018 20:54:46
Objet: Re: New JEP: Concise Method Bodies
2018/9/19 11:42:16 -0700, alex.buck...@oracle.com:
https://bugs.openjdk.java.net/browse/JDK-8209434
Or, more readably: http://openjdk.java.net/jeps/8209434
- Mark
oops,
no, the ';' is necessary here, sorry.
Rémi
- Mail original -
> De: "Remi Forax"
> À: "mark reinhold"
> Cc: "amber-spec-experts"
> Envoyé: Mercredi 19 Septembre 2018 21:40:41
> Objet: Re: New JEP: Concise Method Bodies
>
reinhold"
> À: "Alex Buckley"
> Cc: "amber-spec-experts"
> Envoyé: Mercredi 19 Septembre 2018 20:54:46
> Objet: Re: New JEP: Concise Method Bodies
> 2018/9/19 11:42:16 -0700, alex.buck...@oracle.com:
>> https://bugs.openjdk.java.net/browse/JDK-8209434
>
> Or, more readably: http://openjdk.java.net/jeps/8209434
>
> - Mark
2018/9/19 11:42:16 -0700, alex.buck...@oracle.com:
> https://bugs.openjdk.java.net/browse/JDK-8209434
Or, more readably: http://openjdk.java.net/jeps/8209434
- Mark
https://bugs.openjdk.java.net/browse/JDK-8209434
32 matches
Mail list logo