I · The linear primitives

Stack

Last in, first out.

The story

Turing used a "reserve" of return addresses in his 1946 ACE design. Samelson and Bauer named it Keller ("cellar") in 1955, to manage operator precedence in compiler design, what every modern parser still does.

How it works

Push and pop at the same end. Implementable as a dynamic array (cheap) or linked list (rare). The OS thread stack is just a hardware-managed instance.

Where it lives

Every function call you've ever made. JVM operand stack. Undo history. DFS. Expression parsing. Backtracking solvers.

The key insight

A program with deep recursion is a stack overflow waiting to happen. Tail-call optimisation eliminates the stack frame for tail-recursive calls. Required by Scheme, optional in most languages.