On 20/05/2021 08:35, dfranken@gmail.com wrote:
I also think the proposal of Stuart is reasonable though, but it seemed
to me that we had reached some sort of impasse in this discussion. As
Remi points out, we have (default) methods which sometimes throw
exceptions when they are implemented
Dear Brian,
I understand this would be a massive undertaking.
Still, the date-time library was a mess before Java 8 and it has been
rewritten and found its way to most other libraries.
So while I understand this isn't going to be done any time soon, my
only question was whether it had been
Has it ever been conceived to create an entire new API like how it was
done for Dates and Times? Obviously this would be a massive
undertaking, but it seems to me we've just about reached the limits of
how far we can stretch the current API.
"This code is a mess, we should throw it away and
+0200, fo...@univ-mlv.fr wrote:
> - Mail original -
> > De: "Anthony Vanelverdinghe"
> > À: "Remi Forax"
> > Cc: "Stuart Marks" , "core-libs-dev"
> >
> > Envoyé: Jeudi 13 Mai 2021 21:18:22
>
- Mail original -
> De: "Anthony Vanelverdinghe"
> À: "Remi Forax"
> Cc: "Stuart Marks" , "core-libs-dev"
>
> Envoyé: Jeudi 13 Mai 2021 21:18:22
> Objet: Re: [External] : Re: ReversibleCollection proposal
> Hi Rémi
>
Hi Rémi
The discussion "new types? or new default methods?" is indeed a valid one. In
fact, I think this choice has already been made once in favor of a default
method, when adding `List::sort` was chosen over adding `SortedList` (though I
imagine that choice was a no-brainer).
In this case I
- Mail original -
> De: "Peter Levart"
> À: "Stuart Marks"
> Cc: "core-libs-dev"
> Envoyé: Mercredi 12 Mai 2021 08:28:07
> Objet: Re: [External] : Re: ReversibleCollection proposal
> On 5/12/21 2:55 AM, Stuart Marks wrote:
>> As
- Mail original -
> De: "Stuart Marks"
> À: "Remi Forax"
> Cc: "core-libs-dev"
> Envoyé: Mercredi 12 Mai 2021 07:27:51
> Objet: Re: [External] : Re: ReversibleCollection proposal
>>> I'm certain that uses of RC/RS will be rare i
On 5/12/21 2:55 AM, Stuart Marks wrote:
As you point out, add() is kind of like addLast(), except without the
reordering semantics for LinkedHashSet. And reversed().add() is a
roundabout way of saying addFirst() -- also without the reordering
semantics for LinkedHashSet. I think most
I'm certain that uses of RC/RS will be rare in the beginning, because they will
be
new, and people won't be familar with them. And then there will the people who
say
"I can't use them because I'm stuck on JDK 11 / 8 / 7 / 6 " It was the same
thing with lambdas and streams in Java 8, with
On 5/1/21 7:36 AM, Peter Levart wrote:
On 4/30/21 9:25 PM, Stuart Marks wrote:
So I think we're stuck with void-returning add{First,Last} methods.
Have you thought of perhaps not adding them at all?
Collection.add() for:
List(s) - behaves the same as addLast()
LinkedHashSet - behaves
- Mail original -
> De: "Peter Levart"
> À: "Remi Forax" , "dfranken jdk"
> Cc: "Stuart Marks" , "core-libs-dev"
>
> Envoyé: Mardi 11 Mai 2021 13:44:08
> Objet: Re: [External] : Re: ReversibleCollection proposal
>
on, 2021-05-10 at 12:22 +0200, fo...@univ-mlv.fr wrote:
- Mail original -
De: "dfranken jdk"
À: "Remi Forax" , "Stuart Marks"
Cc: "core-libs-dev"
Envoyé: Dimanche 9 Mai 2021 12:13:58
Objet: Re: [External] : Re: ReversibleCollection proposal
When I t
- Mail original -
> De: "dfranken jdk"
> À: "Remi Forax"
> Cc: "Stuart Marks" , "core-libs-dev"
>
> Envoyé: Mardi 11 Mai 2021 08:45:15
> Objet: Re: [External] : Re: ReversibleCollection proposal
> Dear mr. Forax,
Hi Dave,
t; - Mail original -
> > De: "dfranken jdk"
> > À: "Remi Forax" , "Stuart Marks"
> >
> > Cc: "core-libs-dev"
> > Envoyé: Dimanche 9 Mai 2021 12:13:58
> > Objet: Re: [External] : Re: ReversibleCollection proposa
- Mail original -
> De: "dfranken jdk"
> À: "Remi Forax" , "Stuart Marks"
> Cc: "core-libs-dev"
> Envoyé: Dimanche 9 Mai 2021 12:13:58
> Objet: Re: [External] : Re: ReversibleCollection proposal
> When I thought a
Forax"
> > Cc: "core-libs-dev"
> > Envoyé: Mercredi 5 Mai 2021 02:00:03
> > Objet: Re: [External] : Re: ReversibleCollection proposal
>
> > On 5/1/21 5:57 AM, fo...@univ-mlv.fr wrote:
> > > I suppose the performance issue comes from the fact that
> >
- Mail original -
> De: "Stuart Marks"
> À: "Remi Forax"
> Cc: "core-libs-dev"
> Envoyé: Mercredi 5 Mai 2021 02:00:03
> Objet: Re: [External] : Re: ReversibleCollection proposal
> On 5/1/21 5:57 AM, fo...@univ-mlv.fr wrote:
>&g
On 5/1/21 5:57 AM, fo...@univ-mlv.fr wrote:
I suppose the performance issue comes from the fact that traversing a
LinkedHahSet is slow because it's a linked list ?
You can replace a LinkedHashSet by a List + Set, the List keeps the values in
order, the Set avoids duplicates.
Using a
The line of discussion here was introduced by Remi, who was making an argument of
the form "introducing a type cannot solve this particular problem, therefore,
introducing a new type is not useful at all." I was providing an example of where
the new type is useful as a method parameter. That's
On 4/30/21 9:25 PM, Stuart Marks wrote:
So I think we're stuck with void-returning add{First,Last} methods.
Have you thought of perhaps not adding them at all?
Collection.add() for:
List(s) - behaves the same as addLast()
LinkedHashSet - behaves the same as addLast()
Deque - behaves
OK, I think we can wrap up this portion of the thread.
As the proposal stands, it has add{First,Last} returning void instead of some useful
value. For SortedSet and for LinkedHashMap's views, these throw UOE. Can we do better?
Collection has add(), Deque has add{First,Last} and
On 4/28/21 7:19 AM, Stuart Marks wrote:
On 4/27/21 9:17 AM, Anthony Vanelverdinghe wrote:
On Tuesday, April 27, 2021 11:25 CEST, Peter Levart
wrote:
Now just some of my thoughts about the proposal:
- SortedSet.addFirst/.addLast - I think an operation that would be used
in situations
Hi,
(I think the first version of this message never went through, so here it
goes just in case)
I just read quickly the proposal and it made me think about another common
issue. I wonder if we could tackle it as well.
I will call it the "find the first element when there is only one" problem.
On 4/27/21 9:17 AM, Anthony Vanelverdinghe wrote:
On Tuesday, April 27, 2021 11:25 CEST, Peter Levart
wrote:
Now just some of my thoughts about the proposal:
- SortedSet.addFirst/.addLast - I think an operation that would be used
in situations like: "I know this element should always be
- Mail original -
> De: "Stuart Marks"
> À: "Remi Forax"
> Cc: "core-libs-dev"
> Envoyé: Mercredi 21 Avril 2021 20:53:25
> Objet: Re: [External] : Re: ReversibleCollection proposal
> On 4/19/21 2:01 PM, Remi Forax wrote:
>> - M
On 4/19/21 2:01 PM, Remi Forax wrote:
- Mail original -
Thinking a little bit about your proposal,
introducing an interface right in the middle of a hierarchy is not a backward
compatible change
(you have an issue when the compiler has to use the lowest upper bound).
By example
27 matches
Mail list logo