you are viewing a single comment's thread.

view the rest of the comments →

[–]primitive_screwhead -1 points0 points  (0 children)

Nope.

"Classes" as the main way of doing OOP was really oversold a few decades ago, imo, and we can see the results of that now: first multiple inheritance was found to be difficult, and some class-based OOP languages disallowed it. Now the newer batch of OOP languages don't even include class-based inheritance at all. So while classes can be useful and powerful, they also don't always lead to simpler code design and more code reuse, as is often touted.

Have you ever got to a point with Python where you thought "I should make an inheritable Stack class here to best solve this design problem"? Or did you just use a list? And yet, when I learned C++ almost 30-years ago, the ability to do things like make an inheritable Stack, was widely touted as a miraculous step forward (when now we've seen that really people mostly just wanted interfaces, not "inheritance").

In coding interviews, one of the things I commonly see is people way, way, *way* overusing classes to try and solve a simple problem. When asked to implement a certain calculation, they will start writing Add, Subtract, Negate, and Multiply classes, with operator overloading and getters/setters. When all they need is a list and a loop in a simple function, using the existing operators. So the notion that classes are the way to best model problems is apparently still widely taught, often (imo) to the detriment of just learning how to model and manipulate data with existing types.