Hacker News new | ask | show | jobs
by dekhn 3143 days ago
Complaints about generics aren't coming from a minority group. It's a majority now.
4 comments

How do you know? Anyone who is not interested in generics simply abstains from these discussions/polls. This skews perception.
because people at my company collect data on this.
Could you expand in this? Like, if there's somebody surveying what programmers want as a population, that's pretty cool.
https://blog.golang.org/survey2016-results

Note that generics is the highest requested change.

People want generics because they think every language should have generics.

What they don't know is the exact cases where the lack of generics causes a real-world problem for them. This is what the developers are requesting at the moment, in order to possibly bring generics to Go 2.

Every statically-typed language needs generics to allow a function to be used with more than one type. Otherwise you throw away most of the type info and end up with the same problems dynamically-typed languages have.
The majority may want generics.

I don't know that the majority want generics at the expense of compile times or other possible tradeoffs.

This is exactly my feeling. I don't want generics if I have to pay anything for them in build time, or if it limits go/ast or go/types. A lack of generics has been a pain point a couple of times in my current project (beyond what very simple code generators can provide), but crazy fast build times have been a massive benefit.

Imagine how much wailing and gnashing of teeth there will be if Go 2 delivers generics but with triple the build time and +50% binary size... if you thought the minority was vocal now, wait til you see that!

Thank deity Go language design is not done by popular vote. If you want the Trump of programming languages, you probably have to look elsewhere.
Electoral College?