In addition, consider:  how would you implement the zero default when the 
type is self-referential? For example:

type Treenode struct {
  left *Treenode
  right *Treenode
}

var Tree1, Tree2 *Treenode

Also consider deeply nested types which include pointers to structs which 
contain pointers etc.

You can design a language where pointers can never be nil - but then you 
have to deal with "does not point to anything" some other way (e.g. Maybe 
values).  That ends up with a very different language.

-- 
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/33abb499-1931-4772-ad84-a99d17c7ac5f%40googlegroups.com.

Reply via email to