5 ms·
I'll say it again: Go doesn't have generics because of implementation complexity. The tradeoff was against the additional complexity that our users would have t
by enneff 12y ago
I'll say it again: Go doesn't have generics because of implementation complexity. The tradeoff was against the additional complexity that our users would have to deal with.
- gnuvince 12y agoI was only addressing the comment of the parent that suggested adding parametric polymorphism would kill compiler performance.
- mlatu 12y agoright, because a big codebase to deal with the lack of generics doesnt add complexity at all. you see, the problem with the complexity of a language isnt real. it is perfectly possible to avoid generics in c++ forever. but there will come a day when you think to yourself, was it really worth it to be this lazy? then you take a peek and (assuming you understand generics by then enough to use it a little) suddenly half of what you have writen so far is for the bin.
- SirWart 12y agoI don't know where people would have gotten that idea from: https://golang.org/doc/faq#generics https://golang.org/doc/faq#generics