3 ms·
This is a retread of the 'animal-cat-dog' inheritance stuff we learned in our intro to OOP classes, where some people got together and put forward their own ide
by torginus 4mo ago
This is a retread of the 'animal-cat-dog' inheritance stuff we learned in our intro to OOP classes, where some people got together and put forward their own idea of programming as 'the way forward'.
And me, like others have tried structuring our code like this, and failed, assuming the fault lay not with the idea itself but our skill level. Of course, by now it's kind of common knowledge that inheritance isn't a thing that can and should be used to solve every kind of problem.
Same thing with AOP - it might be sometimes nice, but on the whole, elevating this to the language level seems to be counterproductive.
- mohamedkoubaa 4mo ago>it's kind of common knowledge If only.
- mathisfun123 4mo agoyea it's amazing how many goofy ass "senior engineers" are still cargo-culting inheritance.
- hbn 4mo agoIn my experience it's mostly pushed by university professors that haven't worked in the industry since the 90s.
- rf15 4mo agoAnd thus the people who most graduates learned under, and sometimes start founding their own companies with these principles right after.
- hbn 4mo agoI think most university graduates from the past ~15 years are more likely to get taken in by trendy new cargo-cult fads than repeat things taught to them by dinosaurs in their boring university classes.
- rf15 4mo agoIt took me so long to beat the following into my team: Inheritance and instantiation by default is a no-no. Use instances when state would be useful to the process, and use Inheritance when you have a lot of overlap between two processes/concepts and want to simplify/unify the code base. Application of inheritance is a reaction to the current state of the code, not a foundation you start with.