<story><title>Go says Wat</title><url>https://about.sourcegraph.com/go/gophercon-2018-go-says-wat/</url></story><parent_chain><item><author>miranda_rights</author><text>The Go runtime explicitly randomizes the iteration of map, because the language designers noticed &amp;#x27;Programmers had begun to rely on the stable iteration order&amp;#x27;[0]. Most languages, as far as I can tell, tell you that the iteration order is undefined but frequently have some stable iteration order that&amp;#x27;s consistent for the compiler or the system architecture, and don&amp;#x27;t take the extra step of randomization.&lt;p&gt;[0]&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;blog.golang.org&amp;#x2F;go-maps-in-action&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;blog.golang.org&amp;#x2F;go-maps-in-action&lt;/a&gt; - Header: Iteration Order</text></item><item><author>krylon</author><text>&amp;quot;The order of iteration for a Go map (a hashmap) is unspecified, by design.&amp;quot;&lt;p&gt;I that surprising behavior? It is not only well-documented, but is in line with most other languages that offer a hash table &amp;#x2F; map &amp;#x2F; dictionary &amp;#x2F; whatever in the base language or standard library.</text></item></parent_chain><comment><author>staticassertion</author><text>Those other languages are very arguably making a mistake.&lt;p&gt;I dislike Go for a billion reasons but I appreciate when they &amp;quot;break&amp;quot; APIs that explicitly never made those guarantees.</text></comment>
<story><title>Go says Wat</title><url>https://about.sourcegraph.com/go/gophercon-2018-go-says-wat/</url></story><parent_chain><item><author>miranda_rights</author><text>The Go runtime explicitly randomizes the iteration of map, because the language designers noticed &amp;#x27;Programmers had begun to rely on the stable iteration order&amp;#x27;[0]. Most languages, as far as I can tell, tell you that the iteration order is undefined but frequently have some stable iteration order that&amp;#x27;s consistent for the compiler or the system architecture, and don&amp;#x27;t take the extra step of randomization.&lt;p&gt;[0]&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;blog.golang.org&amp;#x2F;go-maps-in-action&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;blog.golang.org&amp;#x2F;go-maps-in-action&lt;/a&gt; - Header: Iteration Order</text></item><item><author>krylon</author><text>&amp;quot;The order of iteration for a Go map (a hashmap) is unspecified, by design.&amp;quot;&lt;p&gt;I that surprising behavior? It is not only well-documented, but is in line with most other languages that offer a hash table &amp;#x2F; map &amp;#x2F; dictionary &amp;#x2F; whatever in the base language or standard library.</text></item></parent_chain><comment><author>wwweston</author><text>Having done the work of observing langugage users apparently want an ordered map, were there any steps taken to add such a facility, or did efforts stop at letting developers know they were they were wrong by taking away a de facto feature?</text></comment>