2 ms·
> Never go over-fancy with inheritance and whatnot. So much this. Personally, I've grown to prefer object composition for bucketing and sharing reusable funct
by noptd 5y ago
> Never go over-fancy with inheritance and whatnot.
So much this.
Personally, I've grown to prefer object composition for bucketing and sharing reusable functionality across classes over the years. Testing with mocks becomes far easier, and it really seems to simplify the mental model.
Nowadays, I only use inheritance when working with generics and generalizable interfaces.