The original paradigm — a program is a sequence of instructions, organized into procedures that the computer follows step by step.
← Back to FoundationsComputers execute instructions one after another. Procedural programming embraces that reality — give the machine a recipe and it follows.
if; loops).Start with broad steps, then refine each step into smaller ones until you can write the code.
Group related statements into a procedure with a clear name and contract.
How data flows in and out of procedures — affects correctness and performance.
Avoid goto; use blocks, conditionals, and loops to keep flow obvious.
// Compute the average of an array — classic procedural style. double average(double values[], int n) { double total = 0.0; for (int i = 0; i < n; i++) { total += values[i]; } return n > 0 ? total / n : 0.0; } int main() { double data[] = { 10.0, 20.0, 30.0 }; printf("Average: %f\n", average(data, 3)); return 0; }
A function operates on data passed in. No objects, no inheritance — just steps.
| Language | Era | Notes |
|---|---|---|
| FORTRAN | 1957 | The first widely used high-level language. Still alive in scientific computing. |
| COBOL | 1959 | Business data processing. Powers banks, insurers, governments today. |
| BASIC | 1964 | Designed for teaching beginners. Spawned dozens of dialects. |
| Pascal | 1970 | Strongly typed, structured — popular in academia. |
| C | 1972 | The granddaddy of modern programming. Still ubiquitous in OS, embedded, drivers. |
| Go | 2009 | Modern, procedural-leaning, with goroutines for concurrency. |
Many "multi-paradigm" languages (Python, JavaScript, C++, Rust) let you write purely procedural code when it suits the problem.
Drivers, OS kernels, microcontroller firmware. Predictable, close to hardware.
Numerical recipes, simulations, FORTRAN libraries that have run for 50 years.
Shell scripts, build files, one-off automation.
Even in OOP codebases, inner loops are often plain procedural code.