As mainly a Go and Rust programmer, I’m all for generics. But I would love some people in this github issue to travel back in time and talk to their past-self, when their past-self was explaining that “we don’t need generic in go”, “generics make the language hard to approach, and not as simple as Go is designed for”. (I’m paraphrasing)
Anyway, I love this idea, this is good news. As my father used to tell me as a kid: “only morons never change their mind.”
My first foray into Go was in 2009 or 2010 when the first version became public. Couple years after that I was actually paid for writing it, building some pretty cool microservices that are still being used at my previous employer (maybe).
I didn’t ever accept Go not having or needing generics. It was blindingly obvious from the start! The 63th time I had to write a Sort implementation or doing a map/reduce operation I was already bleeding from my retinas, staring at what felt like a completely moronic attitude at programming language design, feeling just abject despair at the boneheadedness of its designers. “Yeah, we aren’t sure how to do them”, they said. Well, I don’t know, Java had them, how about you ask the same guy who implemented them for Java (Philip Wadler). And that’s what they did!
I am glad the Go designers reduced their ultimatum from a never to a maybe, because this is finally a programming language worth taking seriously.
the Go team’s position has never been “never”. This is a proposal for adding generics from a member of the Go team from 2010: https://go.googlesource.com/proposal/+/master/design/15292/2010-06-type-functions.md
their positions were generally of the form “let’s use the language for a bit before we add generics, cause they change a lot” and “all the proposals so far have been for some reason bad”. The idea that the Go team has a history of saying Go will never have generics is not true and has never been true.
You’re right, it was not the Go team itself that presented this attitude! It was the community that developed a cargo cult of sorts around it. That was the weirdest part – the language authors were neutral, if slightly reserved, about generics, but the community for some strange reason had this die-hard anti-generics stance that made no sense at the time.
True. The weird rejection of the idea of generics has largely been a community thing, not the core team. I have issues with some element’s of Go’s design (mainly around the lack of sum types necessitating all kinds of silly hackery), but the Go team themselves have always been pragmatic and non-dogmatic.