E
E
exitialis2015-08-12 16:04:22
PHP
exitialis, 2015-08-12 16:04:22

What is better procedural approach or OOP?

I understand that the topic is quite holivar, but I'll ask anyway. I've been doing programming at a more advanced level recently, and I've learned OOP. I generally like to write in the OOP style, but after browsing the boundless expanses of the Internet, I met criticism of the OOP approach several times, and I decided to delve into this issue more seriously. After reading a lot of material on this topic, I did not find any arguments that would incline me to one or the other approach. Hence the question: what is still better to use for writing applications? OOP or procedures? Thanks in advance for all the answers, preferably reasoned.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Saboteur, 2015-08-12
@saboteur_kiev

Everything has its price. There is no best approach by itself.
There is a task, requirements for the task, and from this it is already possible to start from which method in a particular case will be more convenient.
Therefore, there is no need to look for theoretical conclusions.

K
kompi, 2015-08-12
@kompi

IMHO, OOP is essentially a methodology whose main profit is noticeable in long-lived / complex projects.
An additional layer of abstraction reveals its potential as the complexity of the project grows.
When using OOP, we get a "cleaner" and more rigorous code, which, in turn, directly affects the cost reduction in the further support and development of the project.
Those. it all depends on the scale and complexity of the project, and the resources allocated to it. For the same hello world, obviously OOP is redundant.

E
Espleth, 2015-08-12
@Espleth

Nowadays OOP is used almost everywhere. Why? So obviously it's easier.
Why is OOP not used everywhere? There are a couple of reasons for this: 1) OOP code is slower. Therefore, where high speed is needed, C is often used, for example, drivers. 2) On very small projects, OOP does not provide much code improvement. On the contrary, perhaps in a procedural style, the code will look simpler.
This is how I understand it all.

V
Vladimir Martyanov, 2015-08-12
@vilgeforce

If OOP makes code clearer, more robust, smaller, and otherwise better, use OOP. If the use of OOP does not provide benefits - do not use.

D
Dmitry, 2015-08-12
@thewind

VB+goto

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question