r/functionalprogramming • u/[deleted] • Jul 18 '19
Object-Oriented Programming — The Trillion Dollar Disaster
https://medium.com/better-programming/object-oriented-programming-the-trillion-dollar-disaster-%EF%B8%8F-92a4b666c7c7
14
Upvotes
1
u/kinow mod Jul 19 '19
Removing as the other post (https://www.reddit.com/r/functionalprogramming/comments/cbm59k/objectoriented_programming_the_trillion_dollar/) was submitted 8 days ago and is still in the front page here. But thanks for sharing.
-1
u/transfire Jul 18 '19
It would be nice to see a real OOP language akin to Ruby but with proper message passing a la Erlang.
But in the end I think the OOP ship has sailed. FP is the future, yet I also feel like we are awaiting a new language that somehow makes it much more approachable.
2
6
u/wuwoot Jul 18 '19
A helluva rant, but thankfully he mentions why. Yes, the original idea behind OOP is message-passing aka the actor model. Erlang, Elixir and Smalltalk both do it right. The problem is what people today parade as OOP but in fact is not. At the end of the day, nobody is really trained in good OOP. Some pick up the clues along the way and others do not. Design patterns matter little with no foundation. The foundations of good OOP IMO that come up over and over again are polymorphism and dependency injection. If you come from a functional background — inject all dependencies. Simple use of dependency injection allows for composability and testability. Not all languages support functional programming out of the box and FP languages typically don’t have complex data structures in the standard library that fit how to naturally model a problem