multi-map icon indicating copy to clipboard operation
multi-map copied to clipboard

Specify whether the order of insertion is preserved or not

Open Masterxilo opened this issue 6 years ago • 1 comments

Can you please comment on the order in which keys and values will be returned when iterating this?

JavaScript Map for instance guarantees that iterating over the map returns the keys in the order in which they where inserted.

I assume this library just preserves the order in which the keys where first inserted, and on enumerating keys and values, all values for a fixed key are returned before the key changes.

But you don't specify any guarantees about order anywhere.

This makes it hard to judge whether we can rely on any ordering or not.

In my use case, I absolutely require that the order in which values for the same key are inserted is preserved...

Masterxilo avatar Feb 22 '18 20:02 Masterxilo