I want to write: B = {a, b, c, d, e, f, g}
But I don't want to write duplicate code
So I write:
B = B(A) = {A, e, f, g}
Are there easier ways? No. Inheritance is the most fundamental way of doing this. Composition is just a work around as it results in arbitrary nesting. But ultimately it's the same thing too.
I want to write: B = {a, b, c, d, e, f, g}
But I don't want to write duplicate code
So I write:
aka I use inheritance.Are there easier ways? No. Inheritance is the most fundamental way of doing this. Composition is just a work around as it results in arbitrary nesting. But ultimately it's the same thing too.