4 ms·
Well, it's a soristic problem, but there are some clear heuristics: 1) tons of people have asked for Generics, few have asked for HKTs. 2) C++, C# and Java, p
by coldtea 10y ago
Well, it's a soristic problem, but there are some clear heuristics:
1) tons of people have asked for Generics, few have asked for HKTs.
2) C++, C# and Java, programming languages with millions of users and extremely battle tested have Generics, no mainstream language at that level offers HKTs.
3) As a result of (2) a ton more people are familiar with Generics than HKTs, and so the latter are much less probable to be requested.
And of course, if they do add Generics, and people ask for HKTs, they should consider what they do about that then and there, not now.
No reason to never make a step towards somewhere just because you might (or will) be asked to also take a further one.
Except if they believe that they are already at some optimal point (which is my case I think).
- dmit 10y agoWhat about all those people who came to Go from Python, JavaScript, Ruby and whatnot? They are mostly content with the current status quo, generics would just make the learning cliff steeper for them. And according to the Go devs, more people come to Go from Python than from, say, C++. So perhaps it makes sense to stay at that level, at least for now? All I'm saying is this doesn't seems like a simple equation to me. There are many possible solutions to the problem of building large, correct, maintainable, performant programs - and neither of the existing ones looks like a surefire winner given all the limitations.
- grey-area 10y agoIndeed, not many developers have moved from C++ to Go, though there are a few from Java who might miss generics. Here is some recent data on this: https://golangnews.com/stories/1490-results-of-the-gopher-language-poll https://golangnews.com/stories/1490-results-of-the-gopher-la...
- danenania 10y agoThis is probably a self-fulfilling cycle to some extent... the people using go are by definition willing to tolerate the lack of generics, while those for whom it's a dealbreaker won't be represented. If go did introduce generics, it might start appealing to other types of developers. Personally, I love most things about go, but its utter clumsiness at iteration and data transformation relegate it to a fairly limited number of use cases in my mind.
- grey-area 10y agoI agree containers are the one area this is a painful lack at present. Perhaps they'll look again at this in a Go 2 if they ever get round to that. I do also really value the lack of change in the language though, it is important and rare that it is stable and not accreting features every year (compare with rust or c++).
- vorg 10y agoPeople who came to Go from Python, JavaScript, and Ruby will likely have had a steepish learning curve getting used to pointers in Go. I hadn't used pointers since programming in C++ in 1995 when I switched to Go, and it took a bit of time to get used to remembering that extra detail. In fact, because I used Clojure just before switching to Go, I found not having immutable variables harder to get into the habit of more than anything else. I actually first used Go because I needed to write something that manipulated bits in memory reliably, and couldn't be bothered going back to Java.
- codygman 10y ago> What about all those people who came to Go from Python, JavaScript, Ruby and whatnot? They are mostly content with the current status quo, As a counter-example, I'm not sure this is true.