A sorted map would be tree-based and require its keys to be orderable but not hashable. For instance Rust's HashMap has its key bound on Hash + Eq, while BTreeMap's is bound on Ord.
They're different data structures, with different use cases and different requirements.
> There's no ordering over _most_ hashable values since they span multiple types, so insertion ordering is the only sane way to do it.
Python 2 actually had total ordering of all values. The result was usually stupid but it was there.
They're different data structures, with different use cases and different requirements.
> There's no ordering over _most_ hashable values since they span multiple types, so insertion ordering is the only sane way to do it.
Python 2 actually had total ordering of all values. The result was usually stupid but it was there.