by gizmo686 · 1y ago · 0 comments
The alternative approach is to do what Go did and explicitly randomize iteration order to prevent people from relying on a fixed order in the first place.
In fact, we see this with CPython `set`, controlled by `_Py_HashSecret`:
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...