3 ms·
Adding a type system to an existing language that was never intended to have that type system is not simple. And in Go, the language seems designed to largely e
by cpurdy 4y ago
Adding a type system to an existing language that was never intended to have that type system is not simple. And in Go, the language seems designed to largely eject its type system at the earliest opportunity that doesn't negatively impact the compiler. This will naturally constrain the capabilities of the generic programming constructs, much as it did in Josh Bloch's Java generics implementation.
Go is going to be torn between the minimalism of its creators, and the desires for modern capabilities expressed by its vocal user base. If this were a movie, it would be "A Beautiful Mind".
- skybrian 4y agoThere are vocal critics and sometimes they’re not wrong about some of the flaws, though often they make too big a deal of them. But I think there are also people who appreciate stability? It’s a language people complain about in part because it’s popular. In this case, Tim Bray tripped over “Go doesn’t have inheritance, but it does have embedding” and ran into a couple limitations in the first version of generics, but he’s not making any wider claims.
- xyzzy_plugh 4y agoLuckily for us the Go core maintainers do not capitulate easily to the complaints from the vocal minority.
- cy_hauser 4y agoI thought the genericists were the majority? It was the top most requested feature in the Go surveys for years.
- xyzzy_plugh 4y agoJust because it's the most requested feature doesn't mean it's a majority, it's not even close: > Among the 26% of respondents who said Go lacks language features they need, 88% selected generics as a critical missing feature. From https://go.dev/blog/survey2020-results https://go.dev/blog/survey2020-results Most folks I work with are among the 74% who are content with the language and are mostly cautious of the complexity associated with generics.