freddo@feddit.nu to Programmer Humor@programming.devEnglish · 4 months agoOOP at home:feddit.nuimagemessage-square24linkfedilinkarrow-up11
arrow-up11imageOOP at home:feddit.nufreddo@feddit.nu to Programmer Humor@programming.devEnglish · 4 months agomessage-square24linkfedilink
minus-squaretatterdemalion@programming.devlinkfedilinkarrow-up0·4 months agoIn over ten years of professional programming, I have never used inheritance without regretting it.
minus-squarered_tomato@lemmy.worldlinkfedilinkarrow-up0·4 months agoAnd not once have I regretted removing inheritance.
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkarrow-up0·4 months agoWhen it’s the right tool, it’s incredibly useful. When it’s the wrong tool, and it often is, it racks up tech debt at an incredible rate.
minus-squareAudaciousArmadillo@piefed.blahaj.zonelinkfedilinkEnglisharrow-up0·4 months agoIt works great for technical constructs. E.g. A Button is a UI element. But for anything business logic related, yeah it’ll suck.
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up0·4 months agoEven then there’s rarely a good reason to use inheritance instead of composition.
In over ten years of professional programming, I have never used inheritance without regretting it.
And not once have I regretted removing inheritance.
When it’s the right tool, it’s incredibly useful. When it’s the wrong tool, and it often is, it racks up tech debt at an incredible rate.
It works great for technical constructs. E.g. A Button is a UI element. But for anything business logic related, yeah it’ll suck.
Even then there’s rarely a good reason to use inheritance instead of composition.