Go: Support for Generic Methods
by f311a on 5/27/2026, 9:02:59 AM
https://github.com/golang/go/issues/77273
Comments
by: xena
This will finally let me make the monad library I've been dreaming of for years. Be afraid.
5/27/2026, 5:26:48 PM
by: nasretdinov
Lack of generic methods was really surprising to me when I was first trying to use generics in Go. Nice to see it being actually implemented
5/27/2026, 1:22:26 PM
by: kardianos
This is great. Will be useful for data access methods!<p>As for the detractors, from the first generics proposal this was called out as a "not now", not never. There were questions of implementation. They aren't a super large team, and they try to do things incrementally and do them well.
5/27/2026, 1:08:39 PM
by: h1fra
slowly implementing all the things they said we didn't need
5/27/2026, 12:36:26 PM
by: mackross
What a happy surprise today! The amount of times I’ve had to do weird janky package APIs so the API was still reasonable is more than I can count.
5/27/2026, 3:26:13 PM
by: reactordev
This resolves a big gap in generics for most people coming from other languages to go so I completely approve this direction. Not saying use it everywhere but if you must use it, it’s better to have it on the struct than call a module level generic func.
5/27/2026, 1:35:59 PM
by: samber
OMG. I'm going to recode some of my libraries.
5/27/2026, 2:18:48 PM
by: binary132
Chasing a perceived gap between language features and user expectations has been and continues to be the greatest error in the leadership of Go.
5/27/2026, 1:48:53 PM
by: throwpikerob
A sad day for Go, the pHDs have won, simplicity has died.
5/27/2026, 2:07:22 PM