ScholarGate
アシスタント

Imperative and Object-Oriented Programming

Imperative programming expresses computation as sequences of state-changing commands; object-oriented programming organizes that state and behavior into encapsulated, message-passing objects.

PaperMindでテーマを探す近日公開Find papers & topics
Tools & resources
スライドをダウンロード
Learn & explore
動画近日公開

Definition

Imperative programming describes computation as a sequence of statements that change program state through assignment and control flow; object-oriented programming is a structuring discipline in which state and operations are bundled into objects that interact by invoking methods.

Scope

This topic covers the imperative model of computation built on mutable variables, assignment, and explicit control flow, and the object-oriented discipline that structures imperative programs around objects, classes, inheritance, encapsulation, and dynamic dispatch. It includes subtyping and behavioral substitutability, design patterns, and the relationship between objects and abstract data types.

Core questions

  • How does encapsulation control the complexity of mutable state?
  • What does it mean for one type to be a behavioral subtype of another?
  • When does inheritance help and when does it create fragile coupling?
  • How do objects relate to abstract data types and modules?

Key theories

Behavioral subtyping (Liskov Substitution Principle)
Liskov and Wing formalize when objects of a subtype can safely substitute for objects of a supertype, requiring subtypes to preserve the observable behavior and invariants expected of the supertype.
Structured programming
Dahl, Dijkstra, and Hoare established disciplined control flow and stepwise refinement as the basis for comprehensible imperative programs, displacing unrestricted goto-based control.
Design patterns
Gamma and colleagues catalogued recurring solutions to object-oriented design problems, giving a shared vocabulary for organizing collaborating objects.

Clinical relevance

Object-oriented design underpins much industrial software because encapsulation and polymorphism support modular development and code reuse at scale. The Liskov Substitution Principle and design patterns remain practical guides for building maintainable class hierarchies and interfaces.

History

Imperative programming originated with the earliest stored-program machines and languages such as Fortran and Algol. Simula 67 introduced classes and inheritance; Smalltalk popularized pure object orientation and message passing in the 1970s and 1980s. C++ and later Java brought object orientation to mainstream industry, while Liskov's work on data abstraction and the 1994 Design Patterns book systematized object-oriented methodology.

Debates

Inheritance versus composition
Designers debate whether implementation inheritance or object composition better promotes reuse and flexibility, with much subsequent practice favoring composition and interface-based design.

Key figures

  • Barbara Liskov
  • Ole-Johan Dahl
  • Kristen Nygaard
  • Alan Kay
  • Edsger Dijkstra

Related topics

Seminal works

  • goldberg1983
  • liskov1994
  • dahl1972
  • gamma1994

Frequently asked questions

What is the Liskov Substitution Principle?
It states that objects of a subtype should be usable anywhere objects of the supertype are expected without breaking the program's correctness, which constrains how subclasses may override behavior.
Is object-oriented programming inherently imperative?
Classical object-oriented programming relies on mutable object state and is therefore a form of imperative programming, although object-oriented features can also be combined with functional and immutable styles.

Methods for this concept

Related concepts