News for hackers. Stuff that matters.
Re:Go’s map iteration order is random by yepguy on Sunday April 27, 2014 @03:54PM (#7656546)
Since everyone here seems to be confused: yes, the Go compiler actively randomizes the order of the keys beyond the unpredictability inherent in hash tables. If your function iterates over a map twice in a row without modifying it, you will get different orders.
Re:Go’s map iteration order is random by itripn on Sunday April 27, 2014 @06:55PM (#7657335)
That is empirically not true, at least under go 1.2.1. The poster's own code produces identical iteration results even when iterating the same unchanged Map multiple times in a single code execution.