3 ms·
I tend to agree with you. “Unordered” is very strange when clearly it is consistently “ordered” by some function(name, insertion_id) to facilitate low latency l
by yazaddaruvala 2y ago
I tend to agree with you. “Unordered” is very strange when clearly it is consistently “ordered” by some function(name, insertion_id) to facilitate low latency lookup.
The iteration order seems arbitrary to a human, but that is exclusively because function(name, insertion_id) is not optimized for a human. It seems strange to call the collection “unordered” because of how it appears to a human.
- codeflo 2y agoUnordered simply means the order isn’t exposed, not that the bits have somehow literally fallen out of the computer and are scattered on the floor.
- taeric 2y agoI remember trying to explain to someone that Java's List type was ordered, where they thought ordered meant sorted. Turns out, language is tough.
- tialaramex 2y agoThis often comes up for map types. C++ std::map and Python OrderedDict are both "ordered" but in very different senses of that word. People who wanted one but got the other will most likely be unhappy. Both do always work for "golden test" inputs, which will satisfy the sort of person who writes unit tests after finishing the software by picking inputs and then mutating the checked outputs until the test passes...