Is there any relevant difference between "Object-oriented programming" and "Class-oriented programming"?

Asked

Viewed 104 times

3

I was reading a post that member @Maniero indicated, and I came across a response from another member that raised more questions and decided to search.

In the answer was the following phrase: "Object-oriented programming" and "class-oriented programming", however, I did some research and did not find relevant content to clarify this doubt.

Answer link above where you extract the text: What is the difference between a class and an object?

Search link: https://pt.wikibooks.org/wiki/Programa%C3%A7%C3%A3o_Orientada_a_Objetos/Classes_e_Objetos

On Wikibooks, there is no clear explanation of what is "Object-oriented programming" and what is "Class-oriented programming" .

Every time I search for more information through research, I don’t know which one would be more relevant to my case.

Someone has a better explanation to contribute?

  • Did the answer resolve what was in doubt? Do you need something else to be improved? Do you think it is possible to accept it now?

1 answer

4


Class-oriented programming is a subtype of object-oriented programming.

Languages that allow the use of more popular object-oriented programming, such as Java and C#, require the developer to define his code in classes. This stimulates code compartmentalization and has several benefits that have already been discussed exhaustively in other questions.

However, the forced use of classes also brings limitations, which other object-oriented languages do not. An example is Javascript. This language is object-oriented, and prototyping-oriented - which are different from classes. The class concept doesn’t even exist in Javascript. Behaviors are inherited between objects, not between types. Like the use of classes, the use of prototypes has its advantages and limitations. But I believe comparative analysis is a topic for another question.

More details about prototypes on What is a Javascript Prototype?

Browser other questions tagged

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