3 ms·
> "The order-preserving aspect of this new implementation is considered an implementation detail and should not be relied upon" Except it worked so well in Pyt
by kbd 8y ago
> "The order-preserving aspect of this new implementation is considered an implementation detail and should not be relied upon"
Except it worked so well in Python and PyPy that in Python 3.7 it was blessed into an official part of the language spec.
- ATsch 8y agoI wonder if this isn't going to be seen as a mistake in the future. What if a faster map is discovered in 3 years that happens to not preserve order? This stuff is really hard to detect, so there's no going back on it.
- Kihashi 8y agoIn Python, they'd probably just make it a separate class, just like `OrderedDict` is/was. People who needed the performance would use it and everyone else would enjoy the convenience of ordering.
- dagmx 8y agoThat was likely weighed and I'm guessing the answer is that they would introduce a new type under collections, but that the new dictionary makes most sense for users while also currently being faster