Skip to content

Smalltalk and Squeak

Objects, messages and a system that can inspect itself

Smalltalk combines a language with a live programming environment. Squeak is a later collaborative Smalltalk implementation whose authors made the virtual machine inspectable and portable; it also underlies early Scratch.

A Smalltalk environment is more than a place to type source files. Its objects, classes and development tools form a running system that a programmer can inspect and change. Squeak carried that approach into a portable implementation of Smalltalk-80, with its own graphics, sound and tools available for examination.

Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace and Alan Kay described that work together in their 1997 paper Back to the Future. Squeak is a collaborative implementation, not another name for every earlier Smalltalk or a language created by Kay alone.

Ask an object to do something

Smalltalk organises work around objects receiving messages. A message identifies an operation to request; the receiving object’s behaviour determines how it responds. Classes describe related behaviour, while the programming environment lets the developer browse and alter the definitions.

The running collection of objects is commonly called an image. The virtual machine supplies the machinery that executes the language’s compiled instructions. The image and VM are different parts of the system: moving an image does not eliminate the need for a compatible VM and platform interface.

A Smalltalk image contains objects, classes and development tools. A virtual machine executes its instructions, and a platform interface connects the system to the host computer.
Original Code198x diagram. An image preserves a running object world; the virtual machine and host interface make that world execute on a particular platform.

Write the machinery where it can be studied

The Squeak authors wanted to understand and modify the implementation itself. They wrote the VM in a restricted form of Smalltalk, then translated it into C for practical execution. Their paper describes bringing the new system to the point where it could support its own further development.

That is different from claiming that every Smalltalk application is a C program. The translation concerns the VM’s implementation. The authors also distinguish the comparatively small platform-specific interface from the larger body of portable system code. (Back to the Future, implementation and development sections.)

The connection to Scratch

Early Scratch, including the published Scratch 1.4 source, used Squeak. The connection helps explain how a visual programming environment could be built inside another programmable environment. It does not make Scratch’s blocks identical to Smalltalk syntax, or establish that later Scratch releases use the same implementation.

Squeak’s distinctive contribution is the accessible whole: language, objects, tools and much of the machinery beneath them can be explored together. The convenience comes with a system model of its own, which a programmer must learn rather than treating the environment as a conventional source-file compiler with different punctuation.

Sources

  • Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace and Alan Kay, Back to the Future: The Story of Squeak, a Practical Smalltalk Written in Itself, OOPSLA 1997, pp. 318–326; VPRI TR-1997-001. Original paper.
  • Scratch Foundation, Scratch 1.4 source distribution. Project source.

Checked. Verified against primary sources and signed off by a person.