CodyIT@programming.dev to Programming@programming.devEnglish · 22 days agoOOP is not that badosa1.netexternal-linkmessage-square60fedilinkarrow-up159arrow-down110
arrow-up149arrow-down1external-linkOOP is not that badosa1.netCodyIT@programming.dev to Programming@programming.devEnglish · 22 days agomessage-square60fedilink
minus-squareMajorHavoc@programming.devlinkfedilinkarrow-up3·22 days ago is very hard to create a good inheritance structure that does not devolve over time as new requirements get added That’s such an important point. Whatever else folks take from this thread, I hope they catch that. And I’ll pile on to add - more layers is more risk. One layer of inheritance is a lot easier to keep maintaining than four of them.
minus-squarenous@programming.devlinkfedilinkEnglisharrow-up2·22 days agoAnd if you only have one layer then why not just use interfaces/traits? Which are a vastly better design than inheritance.
That’s such an important point. Whatever else folks take from this thread, I hope they catch that.
And I’ll pile on to add - more layers is more risk. One layer of inheritance is a lot easier to keep maintaining than four of them.
And if you only have one layer then why not just use interfaces/traits? Which are a vastly better design than inheritance.