3 ms·
Still a terrible idea. Speaking from hard experience.
by kabdib 10y ago
Still a terrible idea. Speaking from hard experience.
- lukeschlather 10y agoI've never run into a case where the difference in performance between Dict and OrderedDict was important. I have dealt with legacy code (especially code that needs to interact with JavaScript libraries) where strict-ordering was critical and it was great that at the time I was using Ruby 1.9 in which dicts are explicitly ordered. I agree that waffling about it is bad, but I think ordered is a better default than unordered. All this stuff about deliberately trying to shuffle order to catch bugs just says to me that most code is a lot simpler to get right if dicts are ordered-by-default.