3 ms·
The two approaches are more similar than one might think: inheritance is a special case of composition. In fact, traits (in some languages called typeclasses) u
by lucian1900 13y ago
The two approaches are more similar than one might think: inheritance is a special case of composition. In fact, traits (in some languages called typeclasses) unify inheritance and composition quite nicely.