Object-oriented paradigm
[Object-oriented programming] to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. ~ Alan Kay[1][2]
The object-oriented programming paradigm treats a computer as a system of interacting objects which compute by passing messages to each other. An object simultaneously contains the behavior which is provoked by receiving messages and the state for interpreting messages and modulating behavior.
More rigidly, an object-based language only computes by passing messages between otherwise-encapsulated objects. Languages like C++ and Objective-C are object-oriented but not object-based, while languages like Python and E are object-based. Object-based languages often feature the slogan, "everything is an object."
Many languages claim to have objects but do not actually have message-passing or encapsulation. An example is HQ9++.
History
The object-oriented paradigm was originally introduced by Alan Kay as an iteration upon the PLANNER and Lisp languages given by Carl Hewitt and John McCarthy, drawing upon concepts from biology. In particular, an object is an idealization of a eukaryotic cell, which is an encapsulated environment for performing specialized chemistry. A cell has organelles offering several complex pre-built behaviors. Additionally, an object idealizes a computing machine on the network; the machine may send messages to other machines but it cannot directly inspect them. Kay formalized this intuition with Smalltalk, a language where objects can offer pre-built methods and pass messages to other objects.
Later, Mark S. Miller formalized encapsulation with the concepts of confinement and isolation, leading to object-capability languages like Joule, E, and Monte. An object-capability language treats references to objects as capabilities. A capability to an existing object can be duplicated but not forged from scratch. Object-capability languges idealize individual processes within a machine as objects that contain other objects within them, which E and Monte call vats. Additionally, E introduced a strong distinction between synchronous and asynchronous delivery of messages; E offers the ability to either call a method on an object or send a message representing a method-call to an object. Calls are processed immediately and sends are processed later. This perfectly fits with multiprocessing and networking paradigms; a message can only be called on a nearby object but a message can be sent asynchronously to another process or computer across the network.
More recently, Stephen Kell has argued that a Unix process can be seen as a system of objects based on its underlying tree of memory allocations.[3] Joel Jakubovic interpreted Unix directories as objects and executables as methods, leading to Smalltix.[4]
Schemata
Object behaviors are organized by a schema or script[5]. This schema may also be an object, or it may be a primitive value. It may be inaccessible to user code. Object-based languages, and many object-oriented languages in general, can be classified according to how these schemata reference each other.
Prototype-based
In some languages, everything is an object, including schemata. Every object is therefore a prototype of its own behaviors. These languages offer some way to delegate behavior from one object to another by appointing a prototype as a schema; if the message cannot be handled by the delegator then it is passed to the prototype instead. Examples include:
- ECMAScript
- Self
- Vixen
For more examples, see Category:Prototype-based paradigm.
Class-based
In some languages, objects and schemata are distinct types of value. Each object is associated with a class, a single schema which determines all behaviors. Classes can delegate behavior, creating a relationship between superclasses and subclasses, so that behaviors not present on a subclass can be provided by a superclass instead.
The delegation of behavior between classes is known as inheritance. When a subclass can have many superclasses, it is known as multiple inheritance, as opposed to single inheritance. A final class may not be a superclass.
While object-based languages ideally allow delivery of any message to any object, possibly failing at runtime, class-based languages often reject this. Instead, for every class, there is a type of messages which may be delivered to that class. Languages like Java or OCaml integrate this restriction into more holistic type systems which treat classes as types.
Examples of class-based languages include:
Map-based
Sometimes, objects do not have separate schemata. Instead, the object is specified with its own unique schema. Instead of delegation, objects may extend one another by mere closure. That is, when one object closes over another object at the time of creation, then that created object may delegate messages to any closed-over object. Unlike prototype-based languages, there might not be a way to clone or delegate.
In these languages, a map is a representation of an object's schema. Maps are useful for optimizing prototype-based languages, but they are necessary for compiling languages that do not have any other representation of behavior. In a certain sense, a map is a prototype without a convention for delegating behavior.
Examples include:
See also
For languages that are object-based or facilitate object-oriented programming, see Category:Object-oriented paradigm.
Related concepts include:
- Capabilities
- Encapsulation
- Fat pointers
- Late binding
External resources
References
- ↑ A. Kay, 2003. Private conversation with S. Ram. Dr. Alan Kay on the meaning of "object-oriented programming." https://www.purl.org/stefan_ram/pub/doc_kay_oop_en
- ↑ Software Engineering Stack Exchange, 2011. So what did Alan Kay really mean by the term "object-oriented?" https://softwareengineering.stackexchange.com/a/58732/398052
- ↑ S. Kell, 2015. Towards a dynamic object model within Unix processes. Onward! 2015. https://dl.acm.org/doi/10.1145/2814228.2814238
- ↑ J. Jakubovic, 2025. The Unix executable as a Smalltalk method. Onward! 2025. https://programmingmadecomplicated.wordpress.com/wp-content/uploads/2025/10/onward25-jakubovic.pdf
- ↑ M. S. Miller. Fat Pointers. http://www.erights.org/enative/fatpointers.html