4 ms·
This is definitely not what you learn on college. If you use inheritance instead of composition it is your problem, not OOP problem. You can do the same mess wi
by oselhn 10y ago
This is definitely not what you learn on college. If you use inheritance instead of composition it is your problem, not OOP problem. You can do the same mess with procedures and structs. OOP is not here to magically solve programmers bad design decisions.
- vonmoltke 10y ago> This is definitely not what you learn on college. That is definitely the way I was taught OOP in college. I came out thinking it as a steaming, overcomplicated pile of shit. I have since learned better. Of course, there is a whole world of enterprise programmers for whom what was described is "proper" OOP.
- jakub_h 10y agoDid you attend an "encapsulation, polymorphism, inheritance are our holy buzzwords" (yuck!) kind of technical college or a "focus on messaging patterns" (yay!) kind of technical college? The former kind tends to do that to people.
- vonmoltke 10y agoI actually got this out of a College of Engineering at an actual university. It was mostly the former.
- maxxxxx 10y agoWhen I learned OOP it was all about inheritance. Only later I realized that aggregation is much easier to handle and that functions that take well defined input and return a value without side effects are easier to maintain.
- jakub_h 10y agoIt's never been all about inheritance, they just forgot to tell that to Stroustrup and Gosling. ;)
- kminehart 10y agoMaybe I didn't go to a good enough college, but this is what I was taught. Either way though, this is not how I do OOP. It is what I had to deal with, though.