4 ms·
- Wording uses “prefer”, not “forbid”. - (java) Least interesting example to rebuke “never”: exceptions, interfaces. - (java) inheritance is used by active an
by lucketone 11mo ago
- Wording uses “prefer”, not “forbid”.
- (java) Least interesting example to rebuke “never”: exceptions, interfaces.
- (java) inheritance is used by active and successful projects (e.g. junit5, spring framework). I would argue that success is a pragmatic vindication criteria of a tool/technology.
- bccdee 11mo agoTrue; I suppose I could concede the idea that inheritance has its place if we recognize that that place is quite small and out-of-the-way. My problem is that "everything has its place," without any qualifications, is effectively a blank cheque to use inheritance anywhere and then just go, "well that was its place." Interfaces are great; I wouldn't consider them inheritance. Sure, good stuff has been written with inheritance, but good stuff has been written with C, and that doesn't make C unproblematic. If Postgres were being written today, the authors would probably choose something other than C—we just have better, safer languages for that kind of work now.
- FpUser 11mo ago>"if we recognize that that place is quite small and out-of-the-way" True Scotsman