Skip to content
uencoder

Imperative Programming

Imperative programming describes "how to do it": step-by-step instructions mutate program state, e.g., C/Java/Python for loops.

Purpose

Precisely control execution steps and state changes, with predictable performance.

Mechanism

Variable assignment + control flow (if/while/for) + function calls mutate state. Complementary to declarative. Most mainstream languages are primarily imperative. Low-level control but more boilerplate and more room for error.

Use cases

  • Algorithm implementation
  • Low-level programming
  • Performance control

Related terms

References