title: The proposal for generic methods for Go has been officially accepted
author: u/ketralnis
contenttype: redditpost
publication: r/programming
published: 2026-02-27T16:07:16+00:00
sourceurl: https://www.reddit.com/r/programming/comments/1rgartl/theproposalforgenericmethodsforgohas_been/
word_count: 109
Link: https://github.com/golang/go/issues/77273#issuecomment-3962618141
Score: 441 | Comments: 204 | Subreddit: r/programming
Top Comments
u/BlueGoliath (441 pts):
Go got generic methods before enums. Crazy.
Allow type parameters in methods, Oct. 2021, with > 900 positive emojis
Emoji reactions, truly the best way to measure things.
u/Amazing-Switch-7163 (233 pts):
Nice, maybe Go can add sum types by 2040.
u/ConsoleTVs (42 pts):
Just to clarify. This only allow generic struct methods. Not generic methods on interfaces. That means it's impossible to create, for example, a generic cache interface.
u/18441601 (37 pts):
Didnt go have generics from.1.18?
u/Bartfeels24 (36 pts):
Will this finally make it practical to write generic data structure libraries in Go without code generation, or are there still enough limitations that the workarounds are still faster to just use?
u/yesusuckk (25 pts):
I only use Go for its incredible cross compilation features, but man, I hate it as a language.
It seems the authors intentionally ignored all advancements in the last 20 years of modern programming language design.
u/WillingRow5581 (9 pts):
First of all, congratulations, this is a very useful addition to the language.
Still, I find it baffling and bizarre at best that this happens in _2026_ after the community spending years claiming that "you don't need `map` because you have `for` loops".
When will people learn that programming languages are both a designed engineering tool (so, yes, there is a subjective aspect to them) but they are strictly objects in a mathematical space with forced properties (so, no, you can't remove important bits without losing important expressive power)?!?
The rhetoric around simplicity has made languages like Go and Python immensely less powerful than if they had been designed right from the start, and the fact that inevitably the right stuff gets added later is, as I said already, baffling and bizarre.
Just crack open the damn books language design people.
u/Jannik2099 (30 pts):
before you ask yourself "huh, only now?", remember that the creator of Go thinks syntax highlighting is "juvenile", and that the language was designed with the explicit purpose of "being usable by every programmer at google".
Who woulda thought that static typing mandates generics if you want type safety? Rob Pike's infinite wisdom strikes once again.
u/fearthefuture (24 pts):
Maybe they'll be up to speed with 1980 in 2030.
u/beefsack (5 pts):
Funnily enough, lack of generics in Go was what drove me to Rust many years ago.
I still dabble in Go every now and then, but there are many instances where Go being intentionally simple is a real pain to work around. I know every bit of complexity is a tradeoff, but it's still possible to realise great value with only moderate complexity. It's entirely subjective, but sometimes the overly simplistic language can make code more verbose and harder to read.
u/FridgesArePeopleToo (19 pts):
You couldn't do this before? That's wild
u/BatOk2014 (6 pts):
Yet it doesn't support decimal data type.
u/fuddlesworth (39 pts):
And people still defend this language.