logoalt Hacker News

pjmlp • today at 9:53 AM • 1 reply • view on HN

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


Replies

win311fwg • today at 10:01 AM

> instead of hand-waving it away as needless fluff.

If you go back and watch the original Go announcement it was made abundantly clear that they believed Go did need generics but that they didn't have the expertise to do it. Yes it is true that the book was already written on it, but that doesn't mean anyone on the Go team was familiar with it or had the time to become familiar with it. Programming languages do not require gods to design them. Imperfect humans can too.

The experts on HN who know all the ins and outs of generics could have contributed but, you know, shitposting "go doesn't have generics lol" was a better use of their time. There are so many hours in the day.

➕ show 2 replies