|
|
|
|
|
by skj
4151 days ago
|
|
I think it's important to think of these features in terms of their smallest possible descriptions. One mistake with Java, I think, is that "inheritance" is how you do both polymorphism and composition (I know you can do either without inheritance, but it's especially a pain to do composition without). With Go, polymorphism is done with interfaces. Composition is done with embedded fields (and the very convenient method promotion). |
|