5 ms·
OOP is perfectly fine. Rigid class-based inheritance (especially multi-inheritance) is what sucks. This over-engineered complexity really only benefits things
by echelon 1mo ago
OOP is perfectly fine.
Rigid class-based inheritance (especially multi-inheritance) is what sucks. This over-engineered complexity really only benefits things like window toolkits where you want super rigid modeling of widget types. But even that's a stretch.
Traits do OOP the right way. Complete flexibility.
Dog goes "woof"
Cat goes "meow"
Bird goes "tweet"
And mouse goes "squeak"
Does not need classes.
- garretraziel 1mo agoNot sure if intentional, but I read it in Ylvis’ “What does the fox say?” and now I can’t get it out of my head, thank you very much.
- dnautics 1mo agoNah even traits are kinda bad because it increases the indirection necessary for code reading