Tcl, the Tool Command Language, is an embeddable scripting language created by John Ousterhout. In his own history of the language, Ousterhout writes that he “started work on Tcl when I returned from my sabbatical early in 1988,” and that he “began using the first version of Tcl in a graphical text editor in the spring of 1988.” The idea grew out of a recurring problem he saw at Berkeley: every interactive tool he built needed its own little command language, and each one was reinvented badly. Tcl was meant to be a single reusable command language that any program could embed.
That goal of embeddability is the trait Ousterhout calls “one of the most unique aspects of Tcl.” A C program links the Tcl library, registers its own commands, and instantly gains a full scripting language for driving the application. Rather than being a standalone language that occasionally calls into C, Tcl was designed from the start to live inside a larger host program and extend it. This made Tcl a natural fit as a glue and configuration layer for tools written in C.
The design rests on a deliberately simple rule: everything is a string. Every value, command name, list, and number is represented as text, and a Tcl script is itself just a string that the interpreter substitutes and evaluates. The whole language is built from a small substitution grammar, which keeps the interpreter tiny and makes Tcl easy to generate, store, and pass between programs.
Tcl’s reach widened dramatically when Ousterhout paired it with a GUI toolkit. He “began work on Tk in late 1988,” building, in his words, “a set of GUI components as a Tcl extension and using Tcl to assemble the components into graphical user interfaces.” Tk let developers describe windows, buttons, and canvases in a few lines of script, and the Tcl/Tk combination became a popular way to put a graphical front end on Unix tools.
Ousterhout later generalized the lesson behind Tcl in his paper “Scripting: Higher Level Programming for the 21st Century,” arguing that high-level scripting languages used to glue components together would become as important as the system languages used to build the components. Tcl was the working proof of that thesis, and it influenced a generation of embeddable scripting languages that followed, including Lua.