1. 15
  1. 8

    I’m really interested to see how generics turn out for Go. I used Go quite heavily from 2015 up until 2019, but I’ve not kept up with the language much over the last few years. My impression is that a lot of people who might have cared about generics have moved on to other languages and most of the go community now are either indifferent or actively hostile to the idea.

    I still have a bit of a soft spot for go though, even though it’s not thought of very highly among most of my peers, and if I can find the time I’d like to refactor some of my old open source code to see how it feels with generics.

    1. 3

      Sometimes I feel like I’m the only Haskeller who doesn’t dislike Go; glad to know I’m not actually alone :)

      As someone who has his foot a bit more on both sides still, I will say I don’t think it’s true that there aren’t folks that are excited about them (even besides just me). I’m also optimistic that most folks who are indifferent it’s due to lack of experience, and I suspect most of the haters will come around; my memory from the mailing list discussions is that most of the pushback came from memories of C++ templates; I think if the devs can keep compile times under control, people will chill out when they start to grok how universal types differ from that.

    2. 3

      I think so far the results are that Go is “not bad” if you’re genericizing numbers or slices, but it lags badly if you’re genericizing interfaces, at which point you end up with a double pointer dereference.