The "Pointer to method" in the linked thread represents the method of the type as a function which can be called with any instance. That is, the receiver instance has to be passed as the first parameter when invoking the pointed function. Example code by Ian Lance Taylor from the linked thread (comment mine):
type Foo struct{}
func (f *Foo) Method() {
fmt.Println("Method")
}
func main() {
var foo Foo
fn := (*Foo).Method
fn(&foo) // receiver instance passed as parameter
}
The feature proposed in
Issue 2280 and in this thread would represent the method of a specific instance as a function value. That is, the receiver instance is decided when the function value is obtained, and the caller of the function value only provides the method parameters. An example based on the previous one would be:
func main() {
var foo Foo
fn := foo.Method // not valid in Go1
fn() // receiver is "foo", no parameters needed
}
In Go1, the equivalent can be achieved using a closure. It is short in this example, but it gets longer and more difficult to read when the method has more parameters:
func main() {
var foo Foo
fn := func() { foo.Method() }
fn()
}
Peter