[go-nuts] NaN as key in map
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. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] NaN as key in map
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" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] NaN as key in map
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 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. For more options, visit https://groups.google.com/d/optout.