Everything I can do in POO I can do in PE?

Asked

Viewed 249 times

7

Can I do everything or change anything? I have limits in structured programming where in POO I don’t have?

1 answer

12


Yes, any programming language can do everything. Now, each paradigm You have your own way of organizing, so you can’t always do it the same way. Moreover, with some languages and use of certain paradigms it is possible that specific tasks are easier to do in one paradigm than in another.

Contrary to what many people think, not everything is better object-oriented.

I take this opportunity to say that there is no dichotomy between object orientation and structured programming. The structured programming relates to the algorithm itself, and OOP does not. In fact what you should be calling structured is the imperative paradigm. The fact is that we must, and of course, structurally most of the time.

In some aspects of data structure and how to organize the parts of algorithms, but not the algorithm itself, we do object-oriented. It amazes me how people want to do OO or say they do it without even knowing what it means.

There is the structured and unstructured imperative. Today practically only the structured is used, unless you are using Assembly.

Even languages not created for object orientation can be programmed like this.

I particularly think that OOP in PHP makes little sense, but today almost everyone uses PHP where they shouldn’t. If you want to do something like this and you really like PHP, then go Hack.

Related:

If you search have much more related.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.