+1 for map's zero value. Huge inconsistency in a language. I think, it were made for speed: map is just a pointer (to hidden struct). Zero-map is just nil pointer. To make zero-value mutable there should be assignment to a pointer on every access.
More over, map has reference identity ie it is always copied by reference: a := b b[1] = 1 a[1] == 1 This is impossible to implement with mutable zero value. -- 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.