Field Guide · concept

Also known as: object-oriented programming "OOP"

Object-oriented programming (OOP) is a paradigm that bundles state and the behaviour that acts on it into objects — units that combine fields (data) with methods (functions that operate on that data).1

object data methods (public) interface Shape.area() Circle.area() Square.area() caller
An object hides its data behind methods, and shared interfaces let callers treat different types uniformly.

Core ideas

OOP rests on a few pillars. Encapsulation hides an object’s internal data behind a clean interface, the foundation of abstraction and information hiding. Inheritance derives specialised types from general ones, and polymorphism lets you treat different types uniformly through a shared interface — calling area() without knowing whether the object is a circle or a square.1 These combine to keep coupling low: callers depend on a contract, not a concrete class.

When it fits

OOP shines when a problem decomposes naturally into “things” with identity and lifecycle — a User, a Connection, a tuned Receiver. Languages such as Java, C#, Ruby, and Python support it strongly. Most of the Gang of Four design patterns are expressed in object-oriented terms.

Trade-offs

Critics note that overusing inheritance creates rigid, tangled hierarchies, which is why modern OOP leans on composition (“has-a”) over deep inheritance (“is-a”).1 Many languages are multi-paradigm: the same codebase can mix object-oriented structure with functional transformations and imperative inner loops, choosing the style that fits each part of the problem.

Sources

  1. Object-oriented programming — Wikipedia, for the definition, the pillars (encapsulation, inheritance, polymorphism), and the composition-over-inheritance guidance.  2 3

See also