News for hackers. Stuff that matters.
Re:Go’s map iteration order is random by seth1010 on Sunday April 27, 2014 @02:55PM (#7656253)
What? Is unordered traversal of a hashmap unexpected? I would be surprised if it did anything different.
Re:Go’s map iteration order is random by PeterisP on Sunday April 27, 2014 @04:40PM (#7656757)
In Java, you could write an unittest that inserts 10 fixed items in a hashmap, checks if the first one is "foobar", and it'd always pass, since the order is predictable - it's essentially sorted by the fixed hashfunction of those keys.

In Golang, it'd change between each iteration.