3 ms·
This summary concisely captures the key thing about generics that has kept them out of Go for so long: they weren't created in a vacuum. Go's developers had the
by shadowgovt 5y ago
This summary concisely captures the key thing about generics that has kept them out of Go for so long: they weren't created in a vacuum. Go's developers had the flaws in C++ and Java's approaches to draw on in their attempt to find a better approach. Many people calling for generics to have been implemented sooner were fine with those flaws in the other languages, but the Go team wanted to do better than that.
- pjmlp 5y agoGenerics exist in languages since 1976, more than enough examples than focusing on C++ and Java.
- shadowgovt 5y agogood point! What could the Go team glean from those languages to improve Go's generics implementation?
- pjmlp 5y agoLots of things, here is their acknowledgement that it was a mistake to ignore them. > we were biased too much by experience with C++ without concepts and Java generics. https://go.googlesource.com/proposal/+/master/design/go2draft-generics-overview.md https://go.googlesource.com/proposal/+/master/design/go2draf...
- kaba0 5y agoIf they wanted to avoid problems they would have implemented the feature right away, instead of making it a second thought for a supposedly modern language.