Hacker News new | ask | show | jobs
by ominous_prime 4771 days ago
I would like to believe that the go team members aren't being disingenuous when they say this.

There has been some talk, but it's mixed in with a lot of noise too.

I don't think that anyone is expecting a PL research breakthrough to provide some generics panacea. I think this is more along the lines of how can we pragmatically introduce generics without messing up too bad. From what I've seen, I personally think some form of templating has the most promise (though I am far from qualified to actually comment on its viability).

1 comments

>I don't think that anyone is expecting a PL research breakthrough to provide some generics panacea

That already happened. In 1976. There is simply no excuse for this disingenuous "oh but go is magic and special and can't do it the same way everyone else can" nonsense. If people want that argument to be taken seriously, then they need to start offering actual specific problems with parametric polymorphism as it would apply to go. Not just saying "we're special".

No one is saying generics can't be implemented in go, or that go is "special".

Implementing generics requires tradeoffs of some sort -- compile-time and size, runtime efficiency, or language-complexity. The creators didn't want to accept any of these compromises, at least for the initial release of go.

No, it does not require a trade off. That is exactly what I just pointed out. There is no such problem. Parametric polymorphism was solved in 1976. None of the things you mentioned are actual problems, they simply do not exist. Those are invented excuses. If Rob seriously still hasn't bothered to read CS papers from 30+ years ago, that is very unfortunate. But it does not mean the problem wasn't solved, it just means he is unaware of the solution.
I'm more willing to trust Rob Pike on his assesment than a random Internet comment from someone who has neither knowledge of Go nor has read the comments on their mailing list.
Appeal to authority. You don't have to trust some random comment on the Internet. Read a little about how generics are implemented in other languages today, and you will be able to see the points the commenter is making.
An appeal to authority is not an argumentative fallacy if the authority is, umm, actually qualified to talk about whatever they're saying. There are at most a couple dozen people more qualified and able to talk about the upsides and downsides of programming languages who, moreover, have seen them in action in the course of several decades of computing history (much of which was directly due to this man's actions).

Really, if you have a language, compiler, and operating systems designer of the caliber of Rob Pike saying that generics introduce a lot of issues, I'm going to need some damned good evidence to the contrary.

Quick searches turn up slow compile times as a definite issue with generics. Which means papsosouid's premise is wrong: there IS an issue, and it's one of the ones the Go team considers important. EDIT: read name wrong.