The Image — A Live, Persistent System

Smalltalk

Chapter 4 · The Image — A Live, Persistent System

smalltalk1-3 covered the philosophy — everything is an object, everything is a message. This chapter covers the environment that philosophy actually lives inside, and it's just as unfamiliar to a modern programmer as the message-passing model itself: the Smalltalk "image."

Source Files Are Not the Program — The Image Is

In virtually every language on this site, "the program" is fundamentally a set of source files, compiled or interpreted fresh each run, producing a new process from scratch every single time — c1-1's own compile-then-link model, rust1-1's own cargo build, py1-1's own script execution. The running process's own state disappears the instant it exits; the next run starts over from source, with nothing carried forward.

Smalltalk inverts this entirely. The "image" is a literal, saveable snapshot of an entire live system's objects and state — every class, every object instance, every open window, potentially even a half-finished thought mid-edit — all preserved together in one file. You don't "run the Smalltalk program" the way you run a compiled C binary. You load the image, and you're dropped directly back into the exact live system state you left it in.

What This Actually Means in Practice

There is no meaningful "compile, then run" distinction the way c1-1/rust1-1 established. Changes made to a class apply to the live, running system immediately, while it's executing, with nothing restarted. Objects already running continue running — and, worth naming honestly, can genuinely continue using the old version of a method until something tells them to pick up the new one, meaning a class's own definition and an instance's own currently-running behavior can actually diverge mid-session. Powerful, but a real, documented source of confusion.

This is exactly why Smalltalk programmers didn't typically edit text files in an external editor the way C, Rust, or Python programmers do — the natural way to work is inside the live image itself.

The Class Browser — Live Editing, Not File Editing

The class browser is Smalltalk's own primary development tool. Rather than opening a .java or .rs file in a text editor, a Smalltalk programmer navigates a live, structured view of the actual class hierarchy currently loaded in the running image — browsing packages, classes, and individual methods directly as live objects, editing one method at a time, taking effect immediately upon being accepted. No separate save-then-compile-then-run steps exist at all.

This is a genuinely different mental model from code1's own VS Code Essentials course — however powerful VS Code's own live debugging and hot-reload features are, they still fundamentally operate on files sitting in a folder on disk, edited by a general-purpose text editor. Smalltalk's class browser only makes sense because there are no files in the conventional sense to begin with — the "source" is a live structure inside the image itself.

Contrasted With the Edit-Compile-Run Cycle

State between runsEditing model
C (c1-1)None — compiled binary, exits, goneExternal text editor, separate compile step
Rust (rust1-1)None — cargo build/run, exits, goneExternal text editor, separate build step
Python (py1-1)None per script run, even with a REPLExternal text editor or a REPL, both file-adjacent
SmalltalkFully preserved — the image itself is the stateLive class browser, editing the running system directly

Worth being precise here: a Python REPL (py1-1) and a Smalltalk image are not the same thing, even though both let you type expressions and see live results. A Python REPL session's own state disappears the moment the terminal closes, with no built-in mechanism to save "the whole running interpreter state" back to disk and reload it exactly as it was. A Smalltalk image genuinely can do exactly that — as a first-class, designed feature of the system, not an ad-hoc workaround.

Why This Serves Kay's Original Vision

This ties directly back to smalltalk1-2's own Dynabook material: a live, directly-manipulable, always-running environment is exactly what a child exploring and building things needs — no gap between poking at the system to see what happens and actually programming it. The image is the environment being explored, not a separate artifact produced by a separate build process standing between the person and the system.

A real, genuine friction — previewing Chapter 7
The image-based model creates real friction with things every other course on this site takes for granted. git1's own file-based diff/commit model has no natural analog for "diff this live object graph." Something as simple as sharing code with someone else becomes genuinely harder when "the code" is entangled with a live, potentially large, stateful snapshot rather than a clean set of text files. This is a direct, honest preview of smalltalk1-7's own account of why Smalltalk lost out commercially.
A distant, much narrower echo today
The general idea of "kept state between executions" echoes faintly in things like a Jupyter notebook's own kernel preserving variables between cell runs — but even that is a far more limited, narrower echo than a full Smalltalk image, which preserves the entire live system, not just a handful of variables in one notebook session.

Reflection Questions

Question 1

This chapter describes a scenario where a running object can keep using an old method version after the class itself has been edited. Is this closer to a feature or a bug, in your own view? What would you want to know before deciding?

Question 2

Using a language you already know, describe what "losing your work" typically means when a program crashes. Would that same kind of loss even be possible in a properly-used Smalltalk image? Why or why not?

Question 3

The chapter argues the image model fits Kay's Dynabook vision well but creates real friction with version control. Can you imagine a modern tool or workflow that tries to get some of the image's own benefits without giving up file-based version control entirely? How complete a solution do you think it would actually be?

Chapter 4 Key Takeaways

  • A Smalltalk image is a saveable, live snapshot of an entire running system's objects and state — not source files
  • No compile-then-run cycle — edits apply to the live, running system immediately
  • Running objects can genuinely diverge from a freshly-edited class definition mid-session
  • The class browser edits the live system directly — there are no conventional files to open
  • Unlike a Python REPL, an image's entire state is designed to be saved and reloaded exactly as left
  • The image model directly serves Kay's Dynabook vision, but creates real, honest friction with version control (previewed here, covered in full in smalltalk1-7)