Prefer a written version? There is a visually-explained post on my blog: acairns.co.uk/posts/composition-over-inheritance Disagree? Got feedback? Let me know below, or jump on Discord: acairns.co.uk/discord
As a non coder working with visual scripting languages I have been discovering these concepts by myself, and it's quite rewarding to see my suspisions confirmed by someone more knowledgable
Unfortunately I haven't reached the dizzying heights RU-vid have set for monetisation and can't control when the ads show 😢 One day, maybe... Glad you enjoyed it, though!
first time watching one of your videos, and honestly im impressed. I hope this goes well for you so that i can enjoy these videos in the fututre and so that you can improve even more the quality.
Refreshing to hear real world advice, rather than the usual "always do this" nonsense. Just because a toolset has a tool, doesn't mean should or shouldn't use it. Tools are not good or bad by themselves, but using a hammer for a screw is a bad idea. Great content
Thanks Dave, Glad you enjoyed the video! Nothing is black and white - just lots of different shades of grey in different contexts. It's our jobs as engineers to understand the tradeoffs and make the best decision with the information we have. Also, I just recently used the hammer/nail metaphor in an article! 🤣 acairns.co.uk/posts/primitive-obsession
@@metaphoricallyspeaking I do think there’s a market for accessible and engaging explanations of software engineering concepts. Looks like you’ve got it nailed down. Instantly subscribed!
@@metaphoricallyspeaking the combination of your voice, your visual style and the fact that you’re covering not beginner but intermediate topics make me look forward to you future videos!
haven't watched the video yet, just wanted to say I (a 20yr veteran programmer) just learned about the concept a few weeks ago, though I've been an unknown advocate and practitioner of composition since being introduced to requisite oop in Java in high-school. I've carried the notion through all my projects since. always thought inheritance was a bad idea outside of strict polymorphic virtual functors where you can leverage the compiler to produce code states nessesary vs boilerplate every time a new instance is found. templating in c++ does exactly this for functional and procedural bros ok, watched the video. that last sentence "use inheritance when it exists in that domain" is basically saying the same thing. nothing in the real world actually does this. the nature of reality is to have many close but independently unique variants with- at best- partial heredity on average due to the imperfect copy problem. practically nothing is perfectly all of one other thing plus new stuff.
I don't like the fact that this video misses the importance of interfaces and polymorphism which are solutions to most of the inheritance problems that the video talks about. I honestly think that if you're going to make any kind of program and you're being smart about you program's architecture, you will inevitable use both.
That's fair. Polymorphism is certainly important. The video aimed to demonstrate how composition can address specific problems associated with inheritance. Hopefully I didn't imply it's the only necessary paradigm.