[go-nuts] NaN as key in map

2017-11-10 Thread Dave Cheney
You could iterate over the map with range and retrieve the key and values -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com

Re: [go-nuts] NaN as key in map

2017-11-10 Thread Jan Mercl
On Fri, Nov 10, 2017 at 11:24 PM Stefan Nilsson < trolleriprofess...@gmail.com> wrote: > What's your thoughts on this? Not mine, but recommended reading: https://research.swtch.com/randhash -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" grou

[go-nuts] NaN as key in map

2017-11-10 Thread Stefan Nilsson
NaN is not equal to NaN. This means that if you use NaN as a key in a map[float64]string you will not be able to retrieve it again: https://play.golang.org/p/A7KGgoM3o6 I guess this is the way it should be, but it's still a little bit disconcerting. What's your thoughts on this? -- You receive