On Tue, 2020-11-10 at 22:17 -0800, Kurtis Rader wrote: > Jeebus. H. Christ! Yes, you can "safely" mutate a map while iterating > over it. In as much as doing so will not result in a panic; although, > I'm not convinced that is true. The point of the O.P. is that they > expect the map mutation to always be visible.
Yes, this is why I said it depends on how you define safely. As far as whether is is actually panic-safe, it's specified to be and so is a bug if it's now. Over the time I've been writing in Go, I have never seen a map mutation cause a panic unless due to a raced mutation. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f165b875506d79492d22045d7cdc7fdd428b8af8.camel%40kortschak.io.