4 ms·
Hopefully a good student wouldn't stop listening at that point, because the rest of the linked paper describes how to clean things up precisely because an overd
by Jtsummers 5y ago
Hopefully a good student wouldn't stop listening at that point, because the rest of the linked paper describes how to clean things up precisely because an overdependence on inheritance can create bad outcomes. Quoting from the discussion at the end that GP apparently failed to read:
> In our aggregation pattern we discuss how inheritance is overused and sometimes is incorrectly used. Our pattern addresses how to fix one common misuse of inheritance - but in proposing this pattern, are we (improperly) encouraging an undisciplined use of inheritance, with the idea that one can "fix things later"? We think not. As noted earlier, "is-a" relationships are not always clearly distinct from "has-a" relationships. Points of view change over time, which does not imply that the original use on inheritance was incorrect.
In fact, they're addressing your concern in their own document! Does encouraging early use of inheritance with the intent to refactor later (when you actually know what you're building) cause problems? They don't think so, but that's an opinion born (presumably) from their own experience. Yours may be different, mine hasn't been.
Their discussed model has you (somewhat) abuse inheritance early, while prototyping, and then lists several ways to change the structure of the program once you properly understand the model you're implementing.
- dgb23 5y ago> Quoting from the discussion at the end that GP apparently failed to read What implies that? The quote I gave hints at exactly the stuff you are discussing here.
- Jtsummers 5y agoYour "Well it turns out..." part is what threw off my reading of your comment. That turn of phrase is usually meant to imply that the preceding is, in some way, bogus. If that's not what you intended, I apologize. But it's how it reads to me. Under that reading, it really seems you stopped at that point in the text and didn't continue to where the authors talk about why stopping at that point in the program development is problematic and how to correct it (the later sections).