
Dec. 3, 2022
8:45 p.m.
On 29/11/2022 00:51, Guido van Rossum wrote:
To stir up some more fire, I would personally be fine with sets having the same ordering guarantees as dicts, *IF* it can be done without performance degradations. So far nobody has come up with a way to ensure that. "Sets weren't meant to be deterministic" sounds like a remnant of the old philosophy, where we said the same about dicts -- until they became deterministic without slowing down, and then everybody loved it.
Hi all, hi Guido, Just as a data point, PyPy's sets have been using the same stable ordering like dicts since our introduction of insertion ordered dicts. We have a number of other set optimizations so it's not an apple-to-apple comparison, but still. Cheers, Carl Friedrich