Is there a chance ty or a similar implementation will make it into Go core? What do you think about Go designers being generally averse to the idea of parametric polymorphism?
> Is there a chance ty or a similar implementation will make it into Go core?
I hope not! It was purely an experiment. There are significant draw backs, particularly with respect to performance.
One could reasonably argue that writing parametric functions with reflection should be hard, so as to discourage users from resorting to it too easily.
> What do you think about Go designers being generally averse to the idea of parametric polymorphism?
I think the jury is still out. Russ Cox laid out the essential trade offs given to them: 1) slow programmers 2) slow programs or 3) slow compiler. There's a lot of wiggle room in there (what do you mean by "slow"?), but my sense is that they're still looking for a trade off they're happy with.
In my experience with the Go community, there isn't a ton of internal complaining about the lack of generics. It's certainly brought up now and then, but it doesn't seem to put people off too much. Now, obviously this could just be confirmation bias, but if the Go community keeps growing despite the lack of generics, it may be difficult to justify generics in the future. (i.e., People will live with the first trade off.)
My expectation is that they'll end up giving us something that'll make it easier to work around the lack of generics, but I don't know about getting actually full-on generics. Honestly, I don't want them - they make it way too easy to make overly complex code.... much like class inheritance. I've been developing for 14 years and can count on one hand the number of times I needed something like a tree or graph. Certainly, if you're working on scientific or mathematic projects, you may use them every day of the week, but if so, maybe Go isn't the right language for you, and honestly, it doesn't have to be everything to everyone.
I'm skeptical that trees and graphs are the only thing generics are good for, but, I've published research with open source software written in Go.[1] I've also done it for Haskell.[2] I just try not to pigeonhole languages and learn as much as I can about different paradigms. In my experience, they all have something useful to offer beyond trees and graphs.