Go is Getting Generic Methods
There's an implemented proposal with GOEXPERIMENT adding generic methods to Go, and the reaction is positive in a way that I think slightly misreads what the feature actually does. I couldn't think of a way to trim my thoughts down to 280 characters so here I am. The change is narrow whereby methods will be allowed to declare their own type parameters, the same way top-level functions already can. No changes to interfaces, dynamic dispatch, or reflection support needed. Under the hood, every generic method call can be mechanically rewritten into a generic function call, which is what made this feasible where it previously wasn't. The examples floating around tend to focus on chaining and builder patterns, but that's not really the point. The actual problem being solved is namespace pollution. Right now, if you want a generic operation associated with a type, you have no choice but to put it at package scope, invent a name that won't collide with anything, and ac...