How do I compare two functions for pointer equality in the latest Go weekly?
In Go, is there any way to compare two non-nil function pointers to test for equality? My standard of equality is pointer equality. If not, is there any particular reason why pointer equality is not allowed?

As of now, if I attempt to do this in the straight-forward way:

    package main

    import "fmt"
    
    func SomeFun() {
    }
    
    func main() {
        fmt.Println(SomeFun == SomeFun)
    }

I get

    ./func-pointers.go:12: invalid operation: SomeFun == SomeFun (func can only be compared to nil)

It is my understanding that this behavior was introduced recently.
How do I compare two functions for pointer equality in the latest Go weekly?
===

In Go, is there any way to compare two non-nil function pointers to test for equality? My standard of equality is pointer equality. If not, is there any particular reason why pointer equality is not allowed?

As of now, if I attempt to do this in the straight-forward way:

    package main

    import "fmt"
    
    func SomeFun() {
    }
    
    func main() {
        fmt.Println(SomeFun == SomeFun)
    }

I get

    ./func-pointers.go:12: invalid operation: SomeFun == SomeFun (func can only be compared to nil)

It is my understanding that this behavior was introduced recently.