Alice Pascal: the editor that refused to let you make a mistake
Sit down at an IBM PC running Alice and type FOR. The editor finishes the line immediately — not a suggestion, but a mandatory template: FOR [variable] := [first] TO [last] DO [statement], with labeled holes the program will refuse to execute until you fill each one. In 1984, this was either the future of programming or an insufferable constraint, depending on who you asked.
The program was Alice: The Personal Pascal, and its creator was Brad Templeton, a University of Waterloo graduate who had founded Looking Glass Software in Waterloo, Ontario in 1983. Templeton had been galvanized by a 1981 paper in Communications of the ACM by Tim Teitelbaum and Thomas Reps of Cornell: “The Cornell Program Synthesizer: A Syntax-Directed Programming Environment.” Teitelbaum’s opening line set the stakes plainly — “Programs are not text; they are hierarchical compositions of computational structures” — and Templeton resolved to sell that premise to the IBM PC market. His first customer was the Ontario Ministry of Education.
Alice was a syntax-directed editor, meaning it operated not on characters in a file but on a program’s abstract syntax tree. Type IF and the editor inserted the full IF [condition] THEN [statement] skeleton. A syntax error was, structurally, impossible: the tree Alice maintained could never express one. The cursor moved from placeholder to placeholder; over 700 help screens told you what the grammar permitted at each insertion point, with a “What can I type here?” menu that anticipated IntelliSense by roughly fifteen years. There was no compiler — Alice interpreted directly from the syntax tree — so a cursor could track the currently executing line in real time. Programs could also be exported as standard Pascal text for Turbo Pascal, a polite nod toward the text-based world Alice was quietly arguing against.
The distributor that launched Alice commercially was Software Channels Inc., a division of Graham Software. It collapsed seven months after launch — a misfortune that goes a considerable way toward explaining why Alice, technically ahead of nearly every commercial IDE of its era, did not become the template for what followed. Templeton wound down Looking Glass Software and went on to spend two decades as chairman of the Electronic Frontier Foundation.
What he had built was a commercial incarnation of an idea academic computer science had been circling for years. The Cornell Program Synthesizer (1981), INRIA’s MENTOR editor (1980), and various Lisp structure editors all shared the same premise: text is a lossy representation of a program. Edit the structure directly and you eliminate an entire class of errors before they can form.
The premise never quite won. Text editors won — text is portable, diffable, greppable, and writable on any terminal. What the syntax-directed tradition did instead was plant a flag that every IDE vendor eventually marched toward from the other direction: adding intelligence to the text editor rather than abandoning text. The autocomplete menus, the inline error squiggles, the formatter that keeps your braces honest — all of them are, in some sense, attempting to be Alice without giving up the file.
Sources
- Alice: The Personal Pascal — Brad Templeton — Primary source: Templeton’s account of the project, Looking Glass Software history, Ontario Ministry of Education contract, and distributor collapse.
- Alice User Guide — Brad Templeton — Feature documentation: syntax-directed editing, context-sensitive help, integrated interpreter, real-time cursor-following debugging.
- Structure editor — Wikipedia — Academic lineage: MENTOR, Cornell Program Synthesizer, and the history of the syntax-directed editing tradition.
- Tim Teitelbaum — Wikipedia — Cornell Program Synthesizer (1981 CACM paper) context and influence on structured editors.