I'm sure I'm not the first to say this, but here's my +1:

It seems wrong to me that golang displays nil-valued reference types as an 
empty instance of the type with no indication that the reference is nil.

E.g.
```
var m map[string]string
fmt.Printf("%+v",m)
```

displays as "map[]"

I think it would be better to display something like "<nil>map[]", don't 
you?

Motivation: While the nil map does act like a map[] for reads, it does not 
act like one for writes, and debugging via prints can therefore be 
confusing for new users.

A.

-- 
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/2935bec1-9123-4966-9872-0309f657da34n%40googlegroups.com.

Reply via email to