Paradigms
by Alan Kay
Object-Oriented Programming (OOP) organizes code around objects that encapsulate both data and methods, promoting encapsulation, inheritance, and polymorphism—key principles of OOP.
Founder
Alan Kay is considered one of the founders of object-oriented programming. He introduced key OOP concepts in the 1960s and 1970s while working on the Smalltalk language.
Historical Context:
The idea of organizing data and methods into objects first appeared in the Simula language (developed by Ole-Johan Dahl and Kristen Nygaard) in the 1960s. However, Alan Kay further developed and popularized the paradigm with Smalltalk, introducing core concepts such as encapsulation, inheritance, and polymorphism.
OOP Emerged as an Evolution of Procedural Programming, Where Data and Subroutines Were Not Formally Connected
OOP provides a higher-level organization of code compared to procedural programming by binding data and functions that operate on that data into unified objects.
The System Consists of Objects and Their Interactions
In OOP, the program is made up of objects, each representing an instance of a class—a template describing the structure of data and the methods for working with it. Objects interact with one another by sending messages (invoking methods), making the system flexible and extensible.
Three Principles of OOP
- Encapsulation Encapsulation hides the internal implementation of an object and provides access to the data only through specific methods, improving code security and robustness.
- Polymorphism Polymorphism allows objects from different classes to process data through the same interface, simplifying the management of program complexity.
- Inheritance Inheritance enables the creation of new classes based on existing ones, promoting code reuse and facilitating the creation of class hierarchies.
GRASP Patterns
General Responsibility Assignment Software Patterns — These patterns help determine which responsibilities should be assigned to each class and object in the system, ensuring proper code organization.
GoF Patterns
The Gang of Four (GoF) developed design patterns that offer ready-made solutions for typical problems in OOP. These patterns provide consistency and standardization, making code more maintainable and extensible.
Examples of Languages
- Smalltalk
- Java
- C++
- Ruby
programming paradigm