Hacker News new | past | comments | ask | show | jobs | submit login

> Please don’t email me to argue that map iteration order is random. It’s not.

He definitely knows about this, but more clearly: there is no specified behavior about the map iteration order with a clarification that it can vary for each iteration of the same map, but the intent is that it is explicitly going to be unpredictable [1] and the main Go implementation always behaved like that since 1.0, so such argument is not exactly wrong. (I don't know whether this distinction is intentional. Most likely a simple oversight.)

[1] https://go.dev/doc/go1#iteration




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: