freddo@feddit.nu to Programmer Humor@programming.devEnglish · 1 month agoOOP at home:feddit.nuimagemessage-square21linkfedilinkarrow-up11
arrow-up11imageOOP at home:feddit.nufreddo@feddit.nu to Programmer Humor@programming.devEnglish · 1 month agomessage-square21linkfedilink
minus-squaretatterdemalion@programming.devlinkfedilinkarrow-up0·1 month agoIn over ten years of professional programming, I have never used inheritance without regretting it.
minus-squarered_tomato@lemmy.worldlinkfedilinkarrow-up0·1 month agoAnd not once have I regretted removing inheritance.
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkarrow-up0·1 month 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·1 month 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·1 month 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.