logoalt Hacker News

win311fwg • yesterday at 8:28 PM • 2 replies • view on HN

> generics (something that I still haven't used beyond the tutorials) took an age as well

Only about a year from when the Haskell guys lent their expertise in designing it and it landing in a release. That's actually fairly quick given that it was a pretty significant change under the hood and constrained by only two releases annually.

The Go team was always clear that they didn't have the necessary capabilities internally, despite a lot of failed efforts trying anyway, and were relying on the open source community to lend a hand. Unfortunately, open source doesn't mean open willingness to contribute. It turns out that for all the experts on HN, posting "go doesn't have generics lol" was preferable to helping out.


Replies

pjmlp • today at 9:53 AM

Those guys were the same that helped out with generics in Java, they even published a book in 2006,

https://homepages.inf.ed.ac.uk/wadler/topics/gj.html

Before Featherweight Go, there was Featherweight Java.

So maybe a language designed in 2012 (v 1.0 release year), should learn from history instead of hand-waving it away as needless fluff.

> In retrospect, we were biased too much by experience with C++ without concepts and Java generics. We would have been well-served to spend more time with CLU and C++ concepts earlier.

https://github.com/golang/proposal/blob/master/design/go2dra...

And not all on the team were convinced even after Featherweight Go, here Rob Pike,

> I think the transition to getting polymorphism into the language through generics is has still got some years to work through there's still things that don't quite work right

https://youtu.be/yE5Tpp2BSGw?t=2134

➕ show 1 reply
enneff • yesterday at 8:50 PM

Haskell guys? Got a reference to this? That’s news to me.

➕ show 1 reply