> 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
>
>> From: "Rafael Winterhalter"
>> To: "core-libs-dev"
>> Sent: Thursday, January 16, 2025 8:13:17 AM
>> Subject: F
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
>
>
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
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
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
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
gt; -
>
>> From: "Rafael Winterhalter"
>> To: "core-libs-dev"
>> Sent: Thursday, January 16, 2025 8:13:17 AM
>> Subject: Factory met
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.
>>>>
>>&
gt;> To: "core-libs-dev"
>> Sent: Thursday, January 16, 2025 8:13:17 AM
>> Subject: Factory methods for SequencedSet and SequencedMap
>
>> Hello,
>
> Hello,
&
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
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
>>>> 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
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
>> iteration order.
>>
>> Guavas ImmutableMap and ImmutableSet also preserve insertion order.
>>
>> Regards,
>> Jens Lideström
>>
>>
>> On 2025-01-16 08:44, Remi Forax wrote:
>>
>> > -
>> >
>>
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
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
> 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
>
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
19 matches
Mail list logo