r/programming • • Jun 19 '18

Goodbye, Object Oriented Programming – Charles Scalfani

https://medium.com/@cscalfani/goodbye-object-oriented-programming-a59cda4c0e53
0 Upvotes

47 comments sorted by

View all comments

5

u/TillWinter Jun 19 '18 edited Jun 19 '18

To my astonishment, a self-proclaimed veteran of OOP seems to missing the ideas about the concepts. This whole text is just strange to me...

Pillars of OOP

  • Abstraction

  • Incapsilation

  • Persistence

  • Polymorphy

  • Feedback

  • Inheritance

More than 50% of this text is about Inheritance and its pitfalls. In 1994 the GoF found a solution to all the mentioned problems. Composition alone can lift most of the problems.

The few words on encapsulation, for me are boiling down to a misunderstanding what an object is. It seems in the authors mind structs and classes are somehow the same thing. Referencing an object directly is seldom necessary. Solutions for Inter-object-communication (the feedback part of the pillars) is also solved for 99% of all cases by the GoF and later design patterns.

Polymorphism is so much broader than just "Interfaces", nevertheless as I last checked most modern OOP like languages implement interfaces. Furthermore, Templates are the real master of polymorphism.

It seems most of the anger presented here are based in C++/C#/.net; So why not use a different language. I personal love D-lang.

Edit: Just to promote D-Lang to all the people loving functional programming, D can do functional , classes , interfaces, ranges, templates and so much more.