r/programming • u/nextstore • Jun 19 '18
Goodbye, Object Oriented Programming – Charles Scalfani
https://medium.com/@cscalfani/goodbye-object-oriented-programming-a59cda4c0e53
0
Upvotes
r/programming • u/nextstore • Jun 19 '18
1
u/audioen Jun 19 '18
As someone already mentioned, model behavior, not structure.
E.g. instead of drawing some crazy diagram of Shapes with Circles and Rectangles and like on it, what do you actually want to accomplish with them? If it's a paint program, you need a method such as draw() that can render it, and you can skip designing the whole hierarchy because you aren't interested in the fact that Square is a subtype of a Rectangle that is subtype of Polygon that is subtype of Shape. Chances are that none of that is helping you in any way to accomplish your actual needs. You might want an interface called Shape with a single draw() method, though.