1

I've recently stumbled upon interesting question (or maybe only author's mistake) and I've started to question myself. After some research I have to say I am not 100% sure of my answer, so I would like to ask if my thinking is correct. The question is:

Describe object oriented programming paradigms

I was first thinking that this is polymorphism, inheritance, encapsulation, abstraction. But why there is multiple form? As I understood my answer is description of paradigm (single) not paradigms (plural). Did I miss something, or this is correct answer?

1
  • 1
    What you have listed are not paradigms. The oop paradigm is: to conceive of program as interaction among objects. Or, to view program as a set of interacting objects. Or, to view program in terms of object. this is what OOP Paradigm is in general. Commented Jan 11, 2016 at 21:17

4 Answers 4

2

Basing my argument on definition of paradigm which is generally a pattern of doing something. The paradigms would be:

  • Abstraction
  • Encapsulation
  • Polymorphism
  • Inheritance.
Sign up to request clarification or add additional context in comments.

Comments

1

You might want to check out what Alan Kay has to say about this: http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented

The necessary excerpts from the link:

This definition is derived from early versions of Smalltalk (Smalltalk-72?), and rules 5 and 6 clearly show Smalltalk's Lisp heritage. Kay remarked as such, noting that rules 4-6 would mutate as Smalltalk developed.

  1. EverythingIsAnObject.
  2. Objects communicate by sending and receiving messages (in terms of objects).
  3. Objects have their own memory (in terms of objects).
  4. Every object is an instance of a class (which must be an object).
  5. The class holds the shared behavior for its instances (in the form of objects in a program list)
  6. To eval a program list, control is passed to the first object and the remainder is treated as its message.

"Alan Kay, considered by some to be the father of object-oriented programming, identified the following characteristics as fundamental to OOP:"

  1. EverythingIsAnObject.
  2. Communication is performed by objects communicating with each other, requesting that objects perform actions. Objects communicate by sending and receiving messages. A message is a request for action, bundled with whatever objects may be necessary to complete the task.
  3. Objects have their own memory, which consists of other objects.
  4. Every object is an instance of a class. A class simply represents a grouping of similar objects, such as integers or lists.
  5. The class is the repository for behavior associated with an object. That is, all objects that are instances of the same class can perform the same actions. So far, similar to 1-5 above. Rule 6 is different. The reference to lists is removed, instead we have:
  6. Classes are organized into a singly-rooted tree structure, called the inheritance hierarchy. Memory and behavior associated with instances of a class are available to any class associated with a descendent in this tree structure.

2 Comments

@FlorianSalihovic This answer targets the task given in the yellow box, but not the explicit questions.
@bogl: Since OOP IS the paradigm, I don't think there is much to say about it in general. Wether the question is poorly asked or the question targets the concrete implementations and flavours (i.e. Java vs Smalltalk) is something only the asker could answer. What Alan Kay describes certainly does not fit all languages: Java objects do now communicate via messages and not everything is an object (primitive types for example). Also, dynamic dispatch, late binding and message passing may be some key characteristics to describe, but it would be just a different implementation of an OOP runtime.
0

It depends on the viewing angle, better to say on the granularity, or what do you want to compare or emphasize.

Object oriented programming is one programming paradigm among others. But then there are different categories of object oriented programming. It makes sense to call the plurality of them object oriented programming paradigms.

See https://en.wikipedia.org/wiki/Object-oriented_programming for a beautiful list of programming paradigms.

Comments

0

OOP has its roots in the late 1960s and early 1970s, and it was formally introduced in the late 1980s. The main proponents of OOP were Alan Kay, Bertrand Meyer, and Grady Booch.

The idea behind OOP is to represent real-world objects and their behavior in a computer program. This allows developers to write software that is more intuitive and easier to understand, as well as reuse code by creating objects that can be used in multiple applications.

Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and behavior. In OOP, objects interact with each other by sending messages, and objects can be grouped into classes, which define their shared behavior and data.

OOP has evolved over time, and its use has become widespread in the software industry. Today, several programming languages support OOP, including PHP, Java, Python, C++, Ruby, and more.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.