Section 02 — Philosophy of Computation
By Paradigm
A programming paradigm is a fundamental style of computer programming. Languages are grouped here not by syntax, but by their philosophical approach to expressing computation — how they model state, control flow, and data transformation.
Paradigm 01
Procedural
ImperativeThe oldest and most fundamental paradigm. A program is a sequence of statements that change program state — like a recipe, executed step by step. The programmer specifies exactly how to solve the problem.
Subroutines (functions, procedures) enable code reuse. Variables hold mutable state. Control flow constructs — if/else, loops, goto — direct execution. The underlying model mirrors how CPUs actually work.
Procedural languages span from raw assembly to modern systems languages. FORTRAN (1957) was the first; C (1972) remains its most influential incarnation.
Canonical Examples
Paradigm 02
Functional
Lambda CalculusComputation expressed as the evaluation of mathematical functions. Rooted in Church's lambda calculus (1936). Programs avoid changing state and mutable data — side effects are minimized or controlled.
Key concepts: first-class functions (functions as values), higher-order functions (functions that take/return functions), immutability, referential transparency (same inputs always yield same outputs), and recursion instead of loops.
Pure functional languages (Haskell, Agda) enforce these properties. Impure functional languages (OCaml, F#, Clojure, Elixir) allow controlled side effects. Most modern languages have adopted functional features.
Pure Functional
Impure / Multi-Paradigm Functional
Paradigm 03
Object-Oriented
OOPPrograms are modeled as collections of objects — entities that bundle data (fields) and behavior (methods). Objects communicate via messages or method calls.
Core principles: Encapsulation (hiding internal state), Inheritance (extending existing classes), Polymorphism (different objects responding to the same interface), and Abstraction (hiding complexity behind interfaces).
Smalltalk (1972) was the purest OOP language — everything is an object. C++ and Java popularized OOP for industry. Alan Kay, who coined the term, later said most "OOP" languages missed his original vision entirely.
Class-Based OOP
Prototype-Based OOP
Paradigm 04
Logic & Declarative
Inference EngineInstead of describing how to solve a problem, you describe what is true. The language's inference engine figures out the solution. Programs are collections of facts and rules.
Prolog is the canonical example — declare relationships and let unification find answers. Datalog applies this model to databases. SQL is declarative: you say what data you want, not how to retrieve it.
Logic programming has deep roots in formal logic (Horn clauses, first-order predicate logic) and was central to the Japanese Fifth Generation Computer project in the 1980s. AI research has periodically revived interest.
Paradigm 05
Concurrent & Actor
Message PassingLanguages where concurrency is a first-class citizen, not an afterthought. The actor model (Hewitt, 1973) treats computation as actors that communicate exclusively through asynchronous message passing — no shared state, no data races.
Erlang pioneered this model for telecom — a crashed actor doesn't crash others; supervisors restart failures. This "let it crash" philosophy, combined with hot code swapping, enables legendary uptime.
Go's goroutines and channels offer a lighter weight CSP (Communicating Sequential Processes) model. Rust enables fearless concurrency through its ownership type system at compile time.
Paradigm 06
Array & APL Family
Rank PolymorphismDescended from Kenneth Iverson's APL (A Programming Language, 1966). Operations apply to entire arrays at once — a single expression can compute on millions of values. The paradigm is built on rank polymorphism and symbolic notation.
APL uses special Unicode symbols (⍺, ⍵, ¨, ⍋, ⍒…) as primitive operations. J (Iverson's later language) replaces symbols with ASCII digraphs. Q and K dominate quantitative finance with near-real-time data processing.
This paradigm anticipates modern SIMD operations, GPU computing, and the NumPy model decades early.
Paradigm 07
Stack-Based
ConcatenativePrograms manipulate an implicit data stack using words (functions) that consume and produce values on the stack. There are no named parameters — data flows implicitly through the stack. This is called the concatenative paradigm.
Forth, created by Charles Moore in 1970, is the archetype. Extremely low memory footprint — Forth implementations have run on 4KB of RAM. PostScript (the language of laser printers) is stack-based. WebAssembly uses a stack machine virtual machine internally.
Paradigm 08
Reactive & Dataflow
Signal PropagationPrograms are expressed as directed graphs of data dependencies. When a value changes, all dependent values automatically update. This models spreadsheet logic at the language level — "reactive" values that propagate changes.
Verilog and VHDL use dataflow semantics to model hardware (signals propagate through circuit elements). LabVIEW G is a visual dataflow language. Functional reactive programming (FRP) brings this model to GUI and real-time systems.
Paradigm 09
Esoteric Languages
EsolangsCreated as proof-of-concept, art, humor, or intellectual challenge rather than practical use. Esoteric programming languages (esolangs) explore the boundaries of computation — and sometimes transcend them in surprising ways.
Brainfuck (1993) has just 8 commands and is Turing-complete. Malbolge was deliberately designed to be the most difficult language to write in. INTERCAL was the first joke language (1972). Befunge is two-dimensional.
Despite their absurdity, esolangs have produced genuine theoretical insights. Brainfuck illustrates minimalist Turing completeness. Lazy K explores pure combinatory logic. Many serious concepts originated as playful experiments.