O'Reilly logo
  • Kevin Lozandier thinks this is interesting:

If we have a value of a custom type, its method set consists of all those methods defined for the type that accept a value receiver—but not those methods that accept a pointer receiver. This isn’t as limiting as it sounds, since if we have a value we can still call a method that has a pointer receiver and rely on Go to pass the value’s address—providing the value is addressable (i.e., it is a variable, a dereferenced pointer, an array or slice item, or an addressable field in a struct). So, given the call value. Method() where Method() requires a pointer and <...


Cover of Programming in Go: Creating Applications for the 21st Century


Key distinction.