3 ms·
Exactly right. Now returning to your question... Is it not clear that you might want a method with this type safety that is also restricted to something more
by jayd16 5y ago
Exactly right. Now returning to your question... Is it not clear that you might want a method with this type safety that is also restricted to something more specific than [A any]?
- orblivion 5y agoI do want that. My question is why the blog post doesn't have any examples of it, other than in the "not recommended" section. I'm curious what sorts of uses the Go team would recommend (EDIT: and which they would discourage. I know I'd find uses if left to my own devices, but the Go team might discourage some of them.) So, you could see this as a recommendation/request for a followup blog post.
- orblivion 5y agoSince you say you don't know Go, I'll clarify one thing: the Go ethos includes curbing programmers who like to be clever and tricky and sophisticated. It irritates a lot of us but I understand there's probably wisdom in it. Haskell is one of my favorite languages, you don't have to sell me on generics. Now that Go relented and finally implemented them, a lot of people are worried that the "clever" programmers are going to have their way. This blog post, I think, is a means to curb that. So I'm wondering exactly where the line is from their perspective.