3 ms·
Inheritance. Gah, why won't this bad idea die! Shared calling protocol, shared data sub-structures, fixed compile-time equivalence hierarchy, all clumped toget
by JulianMorrison 15y ago
Inheritance. Gah, why won't this bad idea die!
Shared calling protocol, shared data sub-structures, fixed compile-time equivalence hierarchy, all clumped together.
Go gets it right. Cut the linkage between composition and equivalence. Composition handles inclusion/merging of existing objects. Interfaces handle equivalence of objects. Interfaces can have hierarchies, but there's no one true hierarchy baked into the objects they describe.