5 ms·
I wonder what a survey of real Go users about generics would show. I'm betting an overwhelming majority would like that.
by dvirsky 12y ago
I wonder what a survey of real Go users about generics would show. I'm betting an overwhelming majority would like that.
- bsg75 12y agoWould these be people writing "production" code in Go who need generics, and for some reason have not been instead using a language with the features they need? The whole continued argument is odd. The "whole generics are important" and "Go is too simple" thing seems counterintuitive when all of the comments mention Rust, Haskell, Java, etc., yet the proponents of generics are not using those languages instead. Why if Go does not have the features one needs, would a person be compelled to use it?
- dvirsky 12y agoSimple - it has many other virtues that outweigh this even if you need it. I'm writing a lot of production Go code, and I'm very happy about the language. I wouldn't put generics at the top of my wish list but at times I wish I had them. But not enough that I'm willing to use a 3rd party solution, so I guess not that much :)
- NateDad 12y agoIt's pretty well split down the middle from my experience on these topics. And few people are really ravenous for them. However, you're talking about selection bias. If generics were something you absolutely wanted, you probably wouldn't be using go in production. One of the things you learn when using go is that generics are not the answer to everything. They are certainly the answer to some specific things, like optimal implementations of common algorithms.... But not every application needs to use the A* algorithm, or a left leaning red black tree... Would I like to have generic implementations of those that I could just toss in my application with my own types? Sure. But I've done enough generic programming to remember when you could finally stop writing foo<bar<baz, bat> > And could finally do foo<bar<baz, bat>> .... And I don't really want to have to write that kind of code again.