4 ms·
>I needed many implementations of some base type, the kind of pattern that lends itself well to classes and simple inheritance. Inheritance is an anti-pattern,
by codesushi42 7y ago
>I needed many implementations of some base type, the kind of pattern that lends itself well to classes and simple inheritance.
Inheritance is an anti-pattern, you can accomplish the same with composition.
>you're going to need a dynamically allocating array or hashmap of a specific type, and your choices are either going to be void or some macro thing that makes your eyes cross.
I don't understand, why would you need a *void for a specific type? If you meant heterogeneous types, you can use a typedef union.