Answer the question
In order to leave comments, you need to log in
Why is OOP not OOP?
I was wondering what OOP is. At the university, they told me that it was about encapsulation, polymorphism and inheritance. And they say on radio and TV that this is completely different, that you can’t create static methods, you can’t make singletons, and in general that OOP (oh, God) is not about inheritance. And the one who coined this term generally said that C++ is not an OO language.
There are questions. Does OOP exist now in the form in which Alan Kay conceived it? Do we need the OOP that he intended? Is "true" OOP implemented somewhere? Why is OOP bad now? Why is C++ not OO?
You can recommend sources on the subject, books, videos, whatever. In which direction to dig?
And further. What is it for? What problems do I have when not using OOP? What does it decide?
Answer the question
In order to leave comments, you need to log in
Does OOP exist now in the form in which Alan Kay conceived it?
And on the radio and TV they say that it's completely different
OOP allows large projects to be written by a large number of developers with minimal conflicts.
When a program fits into the head of one programmer, preferably in a short amount of time, no paradigms are needed. If the program is too large, and there are many tasks, they need to be somehow divided into parts that could be programmed independently of each other.
Modules are too big. Decomposing the program into functions and procedures is not enough, a lot of dependencies.
OOP has its own problems - for example, a strong overhead for simple tasks.
But in general, this ideology turned out to be more convenient than others in the vast majority of cases. Allows you to write complex products by average programmers by parallelizing the process.
Inheritance, polymorphism are attempts to make OOP more flexible. The main task is, after all, data encapsulation with methods that can work with this data.
Well, it is clear that when such a term was uttered for the first time, it was far from what the OOP has resulted in now.
There is an ideal OOP in a vacuum, and there are real programming languages and real problems.
OOP is not a silver bullet, it does not automatically solve all problems, just like any other approach, including functional.
It is possible to write object-oriented code in languages without OOP support (in C, for example). It is possible to write procedural code in OOP languages. Encapsulation and polymorphism are generally rarely used in real life, but the desire of beginners to use polymorphism, singletons, and so on everywhere often leads to completely disastrous results.
To understand exactly how OOP helps, how exactly it interferes, what needs to be used, what is not needed, is possible only after several years of practical programming.
What is it for? What problems do I have when not using OOP? What does it decide?To manage complexity.
This is a very holistic topic... it goes to extremes.
For example, there is Egor Buguenko, who drowns for the object, against inheritance, against anonymous letters, against ORM and . MVC
https://www.youtube.com/watch?v=ckjAWXJWZEY
Heated debate:
https://www.youtube.com/watch?v=AshxbePAbCM
The truth is somewhere in between
And yet -- there are other paradigms, such as functional programming as number one of the major paradigms
Friend, what difference does it make to you, you would work first with some kind of project, and then you would understand what's what, and what - for what it will fit. Why do you need these phobias, what is right or wrong?
I liked it about phobias)))) I will briefly answer the last question. It does not solve problems, but when you understand the interaction, it helps to save a lot of time when developing applications. There is no need to repeat pieces of code, but to refer to existing classes and their functions. If you need to fix a specific function, it will be fixed in the entire project at once, no matter how many times you access it and from anywhere. Otherwise, all existing code would have to be parsed and each inclusion fixed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question