Woah! that's a killer reason, the one I was searching for. Thanks for 
pointing it out, as you have saved me a lot of time discarding the proposal 
I had in mind.

I will need to go in other direction.

El viernes, 14 de febrero de 2020, 15:52:07 (UTC), Brian Candler escribió:
>
> 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/e2969605-f82f-4b38-a390-87539c9f3041%40googlegroups.com.

Reply via email to