this post was submitted on 26 Nov 2025
33 points (97.1% liked)
Programming
24097 readers
339 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Great article.
A lot of people are on the "composition over inheritance" bandwagon now, but I've honestly not seen a situation where I felt that inheritance was used and was the wrong choice. (Though most of my experience is in python where there's no diamond problem, mixin classes are common, etc)
What I noticed is that everyone seems to agree that inheriting implementation is useful, because you have that with traits in rust (which are agreed to be good, afaik), so in languages without traits, it seems reasonable to want to use the next best thing
In the 90s, a lot of c++ and Java code was giant trees of inheritance and everyone always talked about design like all real code fit neatly into hierarchies like the examples about animals and whatnot. There are always fashionable ways to overengineer and for a time it was OOP abuse, and the sane people that had to live through it honestly have some trauma over it and difficulty explaining just how bad it was because newer people have never seen the insanity.