by pydry · 4y ago · 0 comments
I remember something similar with their approach to package management which they said wasnt necessary for years.
They really do seem to resist doing the right thing for as long as possible.
I'm paraphrasing and I wish I had a source for you but I'm pretty confident I didn't make that up.
What they sacrificed was runtime correctness, because the type erasure lets you sneak invalid types into unsuspecting code. How much of a problem that's caused in the real world is debatable.
https://web.archive.org/web/20091113154906/http://golang.org...
> Generics may well be added at some point. We don't feel an urgency for them, although we understand some programmers do.
> Generics are convenient but they come at a cost in complexity in the type system and run-time. We haven't yet found a design that gives value proportionate to the complexity, although we continue to think about it.
12 years later, here they are.
I speak here to those who slag on Go and haven't so much as run "Hello World" in it. Those who have used it, especially for some period of time, and especially those who tried long enough to learn to program Go-in-Go (as opposed to Rust-in-Go or C++-in-Go, etc.), and decided they didn't like it due to their experience, I invite to continue discussing. You're not who I'm talking about here. Real experiences with the language are valuable contributions.
Those who haven't had real experiences are not making valuable contributions. "Lol generics, lol they realized they're wrong and I was right all along" and "Lol error handling is bad in Go" are not valuable contributions.
Java was created in an age where very few languages with mainstream relevance had userland generics.
Go was not, and generics had already had to get (somewhat painfully) retrofitted in two of the above.
When Go came out in 2009, though, Java and C# had pushed generics into the mainstream. Additionally, they'd shown some of the problems with trying to retrofit generics onto a language and ecosystem that didn't previously support them.
A tad different from the computing world in 2009.
Generics aren't a cutting edge feature that they wanted to see how it would develop. Their objection against it was ideological.
I can quite believe that the Go team wanted to be sure that the approach made sense for Go, that it was the right solution to the right problem and to keep to their backward compatibility promise. Experience is a good teacher. I really don't know why it matters in the slightest that they didn't arrive at that on day one.
This just isn't how it happened. The Go team never said that they were opposed to generics. Their stance was (i) that it was not a top priority and (ii) that it was difficult problem and they'd take the time to implement generics correctly.
The idea that this is about one group of people finally proving that they're 'right' is a distortion based on viewing events though the lens of snarky comments on the internet.
There were trade offs and they didn’t have a solution on day one.
They’ve always said they were open to them with the right implementation.