4 ms·
I know next to nothing about Go, but I think you're referring to the fact that it has some sort of implicit inheritance resolution - if there is a Reader interf
by nrinaudo 11y ago
I know next to nothing about Go, but I think you're referring to the fact that it has some sort of implicit inheritance resolution - if there is a Reader interface with a read method, and a type A that has a read method with the same signature, then A will be considered to be a subtype of Reader, whether you marked it as such (or whether you want it or not).
I see what you mean, this feels like a static version of duck typing. I'm not sure how I feel about loosing control over what supertypes my type extends, though - well, I lie. I don't like it. But I haven't given this enough thought for a constructive, well argumented discussion on the topic.
- coldtea 11y ago>I'm not sure how I feel about loosing control over what supertypes my type extends, though - well, I lie. I don't like it. Well, don't you lose that by default (and even more) with dynamic typing?
- nrinaudo 11y agoYou do, and I really, really dislike doing any serious work without a solid type system.