Hacker News new | ask | show | jobs
by dbalatero 37 days ago
> Regarding OOP itself, I also remember when "favor composition vs inheritance" become a thing. Was this reversed too?

I think this is generally still the advice, when working in OOP contexts.

1 comments

I agree from my extensive experience writing enterprise CRUD software. At this point, inheritance is like a plague that no one wants to touch. The best examples that I have seen are abstract base classes with insanely restricted overrides. If writing Java, imagine all of the public/protected methods are final except one or two. Wherever possible, classes are intentionally final to avoid any inheritance. To make a joke: "That shit is locked down!"