I tried running the following code across multiple Julia REPL sessions, on MacOSX and Linux, and the outputs were always exactly the same (in the same order):
julia> (Set([1, 2, 3, 4]), Dict(1=>2, 3=>4, 5=>6))
(Set([4, 2, 3, 1]), Dict(3 => 4,5 => 6,1 => 2))
Question: is this behavior guaranteed by the language, across sessions, platforms and versions, and for all hash-based collections?
Notes:
- I understand that the output order may vary depending on the insertion order, especially if there are hash collisions. My question assumes that the insertion order is constant.
- This question is related to my other question about the stability of the
hash()function itself (it's closely related, but different).