You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doc suggestion: note up front it is not sorted by key, but insertion order. #58
When I read "ordered", I thought this package provided for range queries on sorted keys.
The issue about "map is not sorted" set me straight, but there is nothing in the readme to indicate this subtlety.
I only lost ~ 30 minutes to this mis-conception, but I would have appreciated it if the README was more up front about what the overloaded term "ordered" is indicating here. Your usage is not what first comes to mind, though I've certainly implemented the same for some needs.
I'm happy to accept a PR that clarifies the language in the README. In my experience, the word "ordered" is never used for sets and collection that are in fact sorted.
Activity
elliotchance commentedon Jul 9, 2025
I'm happy to accept a PR that clarifies the language in the README. In my experience, the word "ordered" is never used for sets and collection that are in fact sorted.
glycerine commentedon Jul 9, 2025
I'd just put you wrote on that other issue up top, first thing in the readme. I've just changed the word "placed" to "returned"
"This package does not provide a sorted map (where items are returned in sorted order), it is an ordered map (where insert order is maintained)."
For me, ordered is a common synonym for sorted. Insert-ordered-map would be how I would describe this map to make the distinction.
Necoro commentedon Jul 15, 2025
Note that the differentiation between ordered and sorted is quite common.
Python: https://docs.python.org/3/library/collections.html#ordereddict-objects
Java: https://docs.oracle.com/javase/8/docs/api/java/util/SortedMap.html vs https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/OrderedMap.html