Re: Factory methods for SequencedSet and SequencedMap

2025-01-25 Thread forax
> From: "Rafael Winterhalter" > To: "Remi Forax" > Cc: "core-libs-dev" , "joe darcy" > > Sent: Tuesday, January 21, 2025 10:17:35 AM > Subject: Re: Factory methods for SequencedSet and SequencedMap > Wouldn't this already be po

Re: Factory methods for SequencedSet and SequencedMap

2025-01-24 Thread Joseph D. Darcy
> >> From: "Rafael Winterhalter" >> To: "core-libs-dev" >> Sent: Thursday, January 16, 2025 8:13:17 AM >> Subject: F

Re: Factory methods for SequencedSet and SequencedMap

2025-01-21 Thread Rafael Winterhalter
y" > *To: *"core-libs-dev" > *Sent: *Friday, January 17, 2025 6:30:40 PM > *Subject: *Re: Factory methods for SequencedSet and SequencedMap > > On 1/16/2025 11:26 PM, Rafael Winterhalter wrote: > > > Would it even be possible to change the return types of Set.of(...) and > Map.of(...) without breaking binary compatibility? > > > In short, no. > > > [...] > > > -Joe > > > Rémi > >

Re: Factory methods for SequencedSet and SequencedMap

2025-01-19 Thread Remi Forax
than adding SequenceSet/SequenceMap so it's a big if, but it may happen in the future. Rémi > From: "joe darcy" > To: "core-libs-dev" > Sent: Friday, January 17, 2025 6:30:40 PM > Subject: Re: Factory methods for SequencedSet and SequencedMap > On

Re: Factory methods for SequencedSet and SequencedMap

2025-01-19 Thread David Alayachew
That's the missing link. Thanks Archie. Man, I still don't get the decision-making in 1995 to make it not overridable. It is what it is. On Sat, Jan 18, 2025, 10:06 AM Archie Cobbs wrote: > On Fri, Jan 17, 2025 at 7:50 PM David Alayachew > wrote: > >> I guess my next question is, there is no b

Re: Factory methods for SequencedSet and SequencedMap

2025-01-18 Thread Archie Cobbs
On Fri, Jan 17, 2025 at 7:50 PM David Alayachew wrote: > I guess my next question is, there is no bridge method, which is why this > fails. Why not add a bridge method? What is stopping Java from doing this? > In Java class files it's possible to have two methods that differ only in their return

Re: Factory methods for SequencedSet and SequencedMap

2025-01-17 Thread David Alayachew
gt;>> order. >>>>> >>>>> Often it is even a subtle bug to have a random iteration order. For >>>>> example, I ran in to a situation where jdeps printed a error message >>>>> containing a list of modules. But the list was in a different

Re: Factory methods for SequencedSet and SequencedMap

2025-01-17 Thread Joseph D. Darcy
gt; - > >> From: "Rafael Winterhalter" >> To: "core-libs-dev" >> Sent: Thursday, January 16, 2025 8:13:17 AM >> Subject: Factory met

Re: Factory methods for SequencedSet and SequencedMap

2025-01-17 Thread David Alayachew
t jdeps is >>>> implemented using Map.of or Set.of. >>>> >>>> Because of this I think I would be better if the most commonly used >>>> standard collection factories produced collections with a fixed >>>> iteration order. >>>> >>&

Re: Factory methods for SequencedSet and SequencedMap

2025-01-17 Thread Joseph D. Darcy
gt;> To: "core-libs-dev" >> Sent: Thursday, January 16, 2025 8:13:17 AM >> Subject: Factory methods for SequencedSet and SequencedMap > >> Hello, > > Hello, &

Re: Factory methods for SequencedSet and SequencedMap

2025-01-17 Thread Archie Cobbs
On Fri, Jan 17, 2025 at 9:22 AM Ethan McCue wrote: > Just so there are some strawman arguments against: > To pile on... If I go to a restaurant and order a hamburger and they bring me a cheeseburger and also charge me extra for it, I'm going to complain! A Set and a SequencedSet are two differ

Re: Factory methods for SequencedSet and SequencedMap

2025-01-17 Thread Ethan McCue
teration order. For >>>>> example, I ran in to a situation where jdeps printed a error message >>>>> containing a list of modules. But the list was in a different order on >>>>> each run of the program! It took me a while to figure out that it was >>>>> actually the same list. A

Re: Factory methods for SequencedSet and SequencedMap

2025-01-17 Thread David Alayachew
>>>> each run of the program! It took me a while to figure out that it was >>>> actually the same list. A possible explanation is that jdeps is >>>> implemented using Map.of or Set.of. >>>> >>>> Because of this I think I wou

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread Rafael Winterhalter
Set.of. >>> >>> Because of this I think I would be better if the most commonly used >>> standard collection factories produced collections with a fixed >>> iteration order. >>> >>> Guavas ImmutableMap and ImmutableSet also preserve insert

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread David Alayachew
>> iteration order. >> >> Guavas ImmutableMap and ImmutableSet also preserve insertion order. >> >> Regards, >> Jens Lideström >> >> >> On 2025-01-16 08:44, Remi Forax wrote: >> >> > - >> > >>

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread David Alayachew
t; > On 2025-01-16 08:44, Remi Forax wrote: > > > - > > > >> From: "Rafael Winterhalter" > >> To: "core-libs-dev" > >> Sent: Thursday, January 16, 2025 8:13:17 AM > >> Subject: Factory methods for Seq

Re: Factory methods for SequencedSet and SequencedMap

2025-01-16 Thread Jens Lideström
AM Subject: Factory methods for SequencedSet and SequencedMap Hello, Hello, I am happily taking SequencedSet and SequencedMap into use, but one inconvenience I encounter is the lack of factory methods for the two. In code where many (initial) collections have zero or one element (for later

Re: Factory methods for SequencedSet and SequencedMap

2025-01-15 Thread Remi Forax
> From: "Rafael Winterhalter" > To: "core-libs-dev" > Sent: Thursday, January 16, 2025 8:13:17 AM > Subject: Factory methods for SequencedSet and SequencedMap > Hello, Hello, > I am happily taking SequencedSet and SequencedMap into use, but one >

Factory methods for SequencedSet and SequencedMap

2025-01-15 Thread Rafael Winterhalter
Hello, I am happily taking SequencedSet and SequencedMap into use, but one inconvenience I encounter is the lack of factory methods for the two. In code where many (initial) collections have zero or one element (for later aggregation), I now write Set.of()/Set.of(one) and Map.of()/Map.of(key, val