The terminology was introduced in this commit: https://github.com/golang/go/commit/56809d0ade51d3bbd653ba9e9b7c54e2f4ec5f66 One thing you'll notice is that before this, there was a rule that all methods must have the same receiver type. So it was not possible to declare a mix of pointer- and value-receivers. The rules where changed to allow that and the terminology of method sets was introduced at the same time. Including the promotion from value- to pointer-receiver methods.
So, IMO, the reason is pretty clearly "to allow a mix of pointer- and value receivers". On Wed, 11 Jun 2025 at 11:19, Alexander Shopov <a...@kambanaria.org> wrote: > @Axel Wagner > > What about my explanation was dissatisfying? > Please do not take my comment to sound combative. > You gave me *an* explanation but I was looking for *the* explanation. > I was looking more for a design document, discussion, some piece of > tribal knowledge. > I was trying to provide tribal knowledge (I've been using Go at least as far back as 2013). But, of course, I was not in the room before the open source release. Which is when this was decided. As I understand it, the process didn't really include any design documents at that time. And any discussion is, if it was written down at all, on Google-internal lists. So it seems to me, a more satisfying answer can only be provided by the ten or so people working on it at that time and I'll duck out. > Of course there would be downsides for a different design but I am > looking at the way pro-s and con-s were evaluated. > > @Roger Peppe > Thanx. Quite informative - this gives me a pointer on what happens > next and the fact that this behavior is bothersome for other people. > > Another data point: the catchPanic workaround in Go Standard lib came > only in > https://github.com/golang/go/commit/97a929aac95301b850fb855e8e2fa8cfbe47ef59 > This is post go 1.3 (June 2014) but pre 1.4 (Dec 2014). This means > that 4 public releases of Go passed (1.0, 1.1, 1.2, .1.3) before this > was implemented. > Note the review of the patch https://codereview.appspot.com/4640043 > and also the comments. It does not sound like a widely known > workaround. > > If anyone is interested further in this: > git log -G'ValueOf.*Kind.*Ptr.*IsNil' gets some more details: > > 1. It is Rob Pike implementing this > 2. Another place where you do not want such failures is in the AST > tools: > https://github.com/golang/tools/blob/master/go/ast/astutil/rewrite.go#L190 > 3. Another place json encoding/decoding: > https://github.com/golang/go/blob/master/src/encoding/json/decode.go > > Compare with the Golang specification: > 1. Spec started on Mar 2, 2008 - > > https://github.com/golang/go/commit/18c5b488a3b2e218c0e0cf2a7d4820d9da93a554 > by Robert Griesemer > 2. First usage of the term is on May 8, 2009 - > > https://github.com/golang/go/commit/df46b3342ce54129af59e30ff6d9708347f61c75 > by Rob Pike > 3. > https://github.com/golang/go/commit/533dfd62919ecb69a39973cea32d06a1cb166687 > on May 13, and > https://github.com/golang/go/commit/56809d0ade51d3bbd653ba9e9b7c54e2f4ec5f66 > on May 20 by Robert Griesemer stronly corroborate Rob Pike as > originator of the terminilogy. > For comparison Go 1 was released March 2012. > > I am really interested in the background of thinking about method > sets, whether this behavior was thought of initially or it was just an > emerging surprise. Rob has never called this a thing Go got wrong > AFAIK. > Was it programmers misusing the API that were possible to misuse that > caused this implementation? > > Kind regards: > al_shopov > > -- > 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 visit > https://groups.google.com/d/msgid/golang-nuts/CAP6f5M%3Dit%2BAnG%3DB3KSFmcftFJ1DEnuEZR7cr6zBmexBNmKkbdA%40mail.gmail.com > . > -- 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 visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfFF0unyoNqwfwgc364CL%3DBCCrek4txUXFh%3DUDVpbX89mQ%40mail.gmail.com.