5 ms·
It's just a shame that you could EASILY bolt on basic parametric polymorphism to Go with 0 cost and huge benefit. And it'll never happen. The power of a univer
by whateveracct 8y ago
It's just a shame that you could EASILY bolt on basic parametric polymorphism to Go with 0 cost and huge benefit. And it'll never happen.
The power of a universally quantified interface cannot be underestimated!
- joeblubaugh 8y agoNever? This is one of the basic proposals in the Go 2 roadmap.
- pjmlp 8y agoRob Pike is against the current proposal and clearly states it comes from the community. https://www.youtube.com/watch?v=RIvL2ONhFBI https://www.youtube.com/watch?v=RIvL2ONhFBI
- cgag 8y agothe cost of power is chronically underestimated
- whateveracct 8y agoExactly - parametric polymorphism doesn't give you power. It in fact only ever makes your types more constrained! In a theoretical Go: func id<A>(a A) A This only has one terminating, non-panicking valid implementation.