4 ms·
>>Any plans to add templates/a form of generic programming? The Go team is open to generics as soon as there is a proposal they feel fits right without perform
by voidlogic 13y ago
>>Any plans to add templates/a form of generic programming?
The Go team is open to generics as soon as there is a proposal they feel fits right without performance penalties.
Read: http://golang.org/doc/faq#generics http://golang.org/doc/faq#generics
>>Does the community care about that?
Yes, but most people in the Go community are OK waiting for the "right" solution.
>>How have people been working around that?
Generics are nice and convenient, but you can write anything/everything without generics. Just look at everything written in C. And C doesn't have interfaces like Go.
- coldtea 13y ago>The Go team is open to generics as soon as there is a proposal they feel fits right without performance penalties. Because using interface{} for the same tasks fits so much better and has so much better performance right? Tons of languages have implemented Generics -- it's not rocket science since at least 2 decades. If the Go team is not interesting in working on the thing, then I doubt they would be really evaluating any "proposal".
- voidlogic 13y agoI think Generics are just low priority for the Go team. Maybe we will see them in Go 2.0 >>tons of languages have implemented Generics -- it's not rocket science since at least 2 decades. Sure, but that doesn't mean there are not concerns about the way it is often implemented: http://research.swtch.com/generic http://research.swtch.com/generic