The River and the Stone

Twenty-five centuries ago, two Greek philosophers proposed radically different views of reality.

Heraclitus taught that everything flows. "You cannot step into the same river twice," he said, "for new waters are always flowing on to you." Change is the fundamental nature of existence. What appears stable is an illusion---beneath the surface, everything is in constant flux.

Parmenides disagreed. Change, he argued, is the illusion. What exists, exists. What does not exist, cannot exist. How can something come from nothing? How can something become nothing? True reality is unchanging, eternal, one.

These ancient positions map surprisingly well onto modern programming paradigms.

Two Ways to Describe Change

When a pawn moves from e2 to e4, we can describe what happened in two ways:

The Heraclitean view: The pawn changed. It was on e2, and now it has become a pawn on e4. The object transformed. The old position is gone, overwritten, replaced.

The Parmenidean view: Nothing changed. The pawn-on-e2 still "exists" as a fact of history. What we have now is a new fact: pawn-on-e4. The old fact and the new fact are both real. We simply shifted our attention from one to the other.

Natural LanguageNotation
Heraclitus: the pawn moved (transformed)pawn.position = e4
Parmenides: a new state exists (derived)state_1 = state_0 with pawn at e4

Mutable vs. Immutable

In programming, we call these two views:

Mutable
things can be changed in place (Heraclitean)
Immutable
things cannot change; we create new things (Parmenidean)

This is not a minor technical distinction. It is a worldview---a choice about how we model reality.

The next two chapters will explore each view in depth. We will see how the same chess move looks through each lens, and we will begin to understand why this choice matters.