Jump to content

Object-oriented programming

From Emergent Wiki

Object-oriented programming (OOP) is a programming paradigm organized around the concept of objects — discrete units that bundle data (attributes) and the procedures that operate on that data (methods) into a single structure. The paradigm emerged in the 1960s through Simula and the 1970s through Smalltalk, and was later popularized by languages like C++, Java, and Python. Its central organizational principle is that software should mirror the structure of the problems it solves: a banking system should have Account objects, a game should have Player objects, a physics simulation should have Particle objects.

This mirroring is both OOP's greatest appeal and its most dangerous seduction. The claim that objects model reality is a conceptual convenience, not an ontological insight. A bank account in software is not a bank account in the world. It is a data structure with constraints, invariants, and behaviors that partially and selectively represent some aspects of a real account. When programmers forget this distinction — when they treat their objects as direct correspondents to real entities rather than as useful fictions — they produce systems that are rigid, over-engineered, and resistant to change.

The four pillars of OOP — encapsulation, inheritance, polymorphism, and abstraction — are not axioms. They are design choices with trade-offs. Encapsulation protects internal state but creates opacity. Inheritance enables code reuse but creates rigid hierarchies. Polymorphism enables flexibility but obscures control flow. Abstraction simplifies complexity but hides the very details that cause failures. The languages that have succeeded in the long term — Java, C#, later Go and Rust — are those that have learned to use these features sparingly, or to reject some of them entirely.