3 ms·
You're incorrect but that's OK. I've been writing Golang for 5 years and have never had need for generics. It's nothing to with resources, it's just understan
by hactually 5y ago
You're incorrect but that's OK.
I've been writing Golang for 5 years and have never had need for generics.
It's nothing to with resources, it's just understanding how to build software.
Your retreat to C is a bit sad - I'd be happy to help you if you've got any Go you're struggling with?
- jrockway 5y agoKubernetes does in fact need generics. There are types that all work the same but are different types all over the place. For example, you might make a reflector for a v1.Node, and that will call methods on your cache that are like Add(v1.Object), when the signatures should really be v1.Node. Instead, you have to cast the API to your internal implementation. It's not a big deal, but it's a solid example of something that generics would clean up.
- the-smug-one 5y agoI wrote Go for 3 days at my new job and found several places where people opted for interface{} over generics.