-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State clearly in the documentation that the iteration of a Set occurs in undefined order #23269
Comments
The results of hash functions that don't depend on memory locations aren't exactly predictable either. While the same from run to run, one still shouldn't depend on the order. |
ref #12198 |
Is this issue still relevant? Julia's documentation about Set says: "The order of elements in a Set is an implementation detail and cannot be relied on." Should it be more clear than that? If so, I could solve this one. |
looks good as is to me |
Since Sets hash items depending on memory locations, this is not deterministic. Therefore iterating over a Set will traverse items in undefined order.
This behaviour has been the cause of some hard to find bugs for me. I am not saying that there is something wrong with it, but it should be clearly stated in the documentation, so that we are alert.
The text was updated successfully, but these errors were encountered: