Answer the question
In order to leave comments, you need to log in
Why is OOP said to be evil?
Hello.
I started learning PHP and programming in general. About 10 years ago, somehow it was the case, but it didn’t work. Now I seriously decided to study programming languages, the very essence of programming with paradigms and other things, Schaub brains did not disappear ... and I like it when everything is under control. And this feeling that you created something =)
And the OOP began to bother smoking a separate topic, the essence and all that. I dug up tutorials, playlists on YouTube, saved it, stuck it to myself, and in related videos, vids like David West OOP is Dead! Long Live OODD! and Object-Oriented Programming is Bad. I understand that this is something like a holivar? Guru, give an objective opinion so that I don't have a bias, or at least so that I understand where I'm getting into. I am practically zero in programming, but I understand that for every need there is a solution, language, etc.
Answer the question
In order to leave comments, you need to log in
Nonsense. OOP is a very powerful paradigm. There are cases when it is too expensive, it's true, but to say that it is evil...
Of course, if you cover yourself with all sorts of haskels, lisps, erlangs, rocks... where the OOP paradigm may not give profit, or is not applicable at all - specifically in those languages do not need to use it.
In languages sharpened by the OOP paradigm - FP is likely to be a bad idea.
Somehow there was an article, it’s a pity I didn’t find it (if anyone finds it, please write in the comments), with a comparison of OOP and FP, one of the theses was a comparison of existing principles and patterns, in OOP: inheritance, polymorphism, encapsulation, SOLID, IoC, ServiceLocator, ... and for FP: functions, functions, functions...
FP is now gaining popularity, but many people, including my friends, ardent fans of this direction, returned back to the "classic", the main reason was this: the price of support was too high.
Just try one, then another, and come up with the one you like best. Somewhere you need OOP, somewhere you don't. Polymorphism, in the form of virtual functions, for example, allows you to perfectly get rid of unnecessary conditions.
OOP is often abused.
There was a dawn of the OOP - about 20 years ago, and after that 10 years as everyone was doing hard in the OOP.
Realized it was overkill. Lightweight OOP
is now in vogue : not classes, but interfaces.
Srach around OOP is a topic from the 70s. Then, when computers were slow and there was little memory, the objections of the opponents of the OOP (then they were serious, respected people) were reasoned and understandable. Now the thesis "OOP is evil" causes nothing more than a sad smile and clearly marks comrades who have nothing to do with programming.
Although you should not abuse OOP either, for example, the class for solving quadratic equations looks ridiculous
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question