On Mon, 8 Sept 2025 at 08:34, Per-Ake Minborg
wrote:
> I think there is a more general discussion to be had that should be aligned
> with the direction of the immutable collections and any potential constructs
> with deterministic order there.
I agree, because the direction of travel for Map.of
To: Pavel Rappo
Cc: Ryan Ernst ; Kevin Bourrillion
; Stephen Colebourne ;
core-libs-dev
Subject: Re: StableValue and non-deterministic iteration order
On Fri, Sep 5, 2025 at 3:32 PM Pavel Rappo
mailto:pavel.ra...@gmail.com>> wrote:
Be it Map.of or HashMap, there's no user-defined
;
>
>
>
> From: core-libs-dev on behalf of Stephen
> Colebourne
> Date: Friday, September 5, 2025 at 12:13 AM
> To: core-libs-dev
> Subject: StableValue and non-deterministic iteration order
>
>
> In summary, the current Map.of() is a bit of a hand grenade IMO, and
> something I pretty much banned at my previous company. Which is a
> problem given its key role in StableValue.
>
> Stephen
On Fri, Sep 5, 2025 at 3:32 PM Pavel Rappo wrote:
> Be it Map.of or HashMap, there's no user-defined order. The only
> user-defined order one can currently get is by using LinkedHashMap. In
> the future though, we may get SequencedMap.of.
I vote for adding SequencedMap.of(). That seems like a g
On Fri, 5 Sept 2025 at 20:00, Stuart Marks wrote:
> What's the connection between Map.of()'s randomized encounter order and
> StableValue
> or the JIT's ability to constant-fold? Are you observing that randomized
> encounter
> order precludes constant folding? Or are you saying that something sh
On 9/5/25 12:12 AM, Stephen Colebourne wrote:
Back in March 2023 there was a discussion about the non-deterministic
iteration order of Map.of() and friends:
https://mail.openjdk.org/pipermail/core-libs-dev/2023-March/102865.html
It feels like this discussion should be revisited now that we ha
ore-libs-dev"
>
> Sent: Friday, September 5, 2025 5:22:47 PM
> Subject: Re: StableValue and non-deterministic iteration order
> Just as a corroborating data point, it’s banned at my previous company too,
> and
> this is a big reason why. Deterministic iteration is a very
: StableValue and non-deterministic iteration order
The iteration order is deterministic. The problem raised in that thread was
that the seed is hidden and uncontrollable.
IMO if you want a Map that has order, use a LinkedHashMap (or the idea is
SequencedMap.of is also appealing). However, even if you
of Stephen
> Colebourne
> Date: Friday, September 5, 2025 at 12:13 AM
> To: core-libs-dev
> Subject: StableValue and non-deterministic iteration order
>
>
> In summary, the current Map.of() is a bit of a hand grenade IMO, and
> something I pretty much banned at my pre
: core-libs-dev on behalf of Stephen
Colebourne
Date: Friday, September 5, 2025 at 12:13 AM
To: core-libs-dev
Subject: StableValue and non-deterministic iteration order
In summary, the current Map.of() is a bit of a hand grenade IMO, and
something I pretty much banned at my previous company. Which
Back in March 2023 there was a discussion about the non-deterministic
iteration order of Map.of() and friends:
https://mail.openjdk.org/pipermail/core-libs-dev/2023-March/102865.html
It feels like this discussion should be revisited now that we have
StableValue. Map.of() is one of the few ways (al
11 matches
Mail list logo