News for hackers. Stuff that matters.
Re:Go is not an easy language by nemo1618 on Monday February 22, 2021 @01:07AM (#26221370)
> Giving maps a runtime penalty of random iteration in order just to punish devs who don't read docs is annoying

Can you explain what you mean by "runtime penalty?" Last I checked, the iteration is only random wrt its starting offset; after that, it proceeds linearly through the buckets. So you only generate one random integer per `range`, which seems acceptably cheap.

Re:Go is not an easy language by scaladev on Monday February 22, 2021 @05:33AM (#26222914)
It still seems to be working as you described.

https://github.com/golang/go/blob/db8142fb8631df3ee56983cbc1...