On this page
  1. Imperative & Procedural Programming
  2. Contents
  3. Core Model: State + Procedures
  4. Strengths & Trade-Offs

Imperative & Procedural Programming

Prev: paradigms | Up: paradigms | Next: Object-Oriented Programming
Rel: Control Flow & Composition, Call Stack & Heap
Ref: Wikipedia — Procedural Programming
Tags: #public #prog #programming #paradigms


Contents


Core Model: State + Procedures

Imperative programming describes how to compute a result as an explicit sequence of commands that mutate program state. Procedural programming structures those commands into reusable procedures (functions) operating on plain data records (structs):

record Account { balance: int }

procedure deposit(account, amount):
  if amount > 0:
    account.balance = account.balance + amount

Data and behavior remain decoupled, mirroring how CPUs actually execute instructions in memory.


Strengths & Trade-Offs

Linked from

Related notes