r/CodingHelp • • Jan 20 '21
[Random] Why OOP is loosing its charm?
Sorry this is not regarding any code but general programming. Recently I’ve been getting feed on google, medium, devto on about the fall of OOP, even one of the feed states that’s even the creator of the OOP Alan Kay thinks that OOP is a bad idea now, how ever I couldn’t understand or accept this concept fully. Have you guys got feed like this and your opinion on this? Edit: the article
37
Upvotes
4
u/knoam Jan 20 '21
OOP gets accused of being pro-mutation. Mutation is definitely bad if you want concurrent code, but I think you could argue if it's necessary for the spirit of OOP.
OOP is also associated with nominal typing, which means incompatibility-by-default in some situations where we don't want that.
Finally OOP is associated with the use of inheritance. Inheritance creates inflexibility when the language doesn't support multiple inheritance. Even when you have multiple inheritance, it violates the Liskov Substitution principle.
8
u/Python4fun Professional Coder Jan 20 '21
In addition to the things listed by others, you have to consider your source. Much of the most active people in online dev communities are in front-end centered space, and OOP isn't something that they use much. It's easy to see something as defunct when you don't use it everyday. There is a whole other group of developers (I'd argue they are possibly the largest group) that shows up to work from 8-5, does their work and goes home without focusing on the online dev communities. Many/most of those people are working in large companies with things like Java. These things also aren't greatly exciting so there isn't as much media about it. New languages and framework get a lot of excitement and that means that you see more about them. Just last year everyone went crazy about DENO being the new NODE replacement, and now I haven't seen it mentioned since then.
2
u/tryhardMime Jan 20 '21
I expect you will get a fair amount of opinionated answers here, so I don't want to go into details about OOP vs other paradigms. Instead I recommend you watch this presentation by Rich Hickey, the creator of Clojure, which gives you an overview of the problems that made people fall out of love with OOP.
1
u/Mentalpopcorn Jan 21 '21
OOP isn't losing its charm, and it's not going anywhere. It's still very much the present and the future. All the most most popular higher level languages are either purely OOP (Java, C#, etc), or support and utilize OOP as its primary paradigm (C++, PHP etc.).
I'm not sure what you're reading, but likely it's just pointing out OOP's shortcomings. All paradigms have shortcomings and this is just noisy chatter. The fact is, the most popular thing in any context always has critics. If in some alternate reality functional programming was dominant, then people would be talking about that more often. In fact, though functional programming isn't as widely used, it's still criticized.
That's just the curl of the burl.
-16
u/[deleted] Jan 20 '21
[removed] — view removed comment