On Sun, 26 Mar 2023 at 10:38, Jens Lideström <j...@lidestrom.se> wrote:
>
> I think Map#of and friends would be more useful and less error prone if they 
> where to return collections that have a fixed iteration order, where the 
> order is defined by the insertion order when the map is created.

The problem is that everyone will have to pay for the extra storage cost for
maintaining insertion order. Even if people don't need it. Hence, why I
suggested adding factory/copyOf methods for SequencedMap/SequencedSet
for those people that need to rely on order. (Rereading Chris's email I know it
wouldn't help his use-case).

/Kasper

Reply via email to