Language

Tcl

First appeared
1988
Paradigm
Imperative, scripting, command-based
Toolchain
Tcl 9.0.1
Container image
debian:trixie-20261027-slim + tcl9.0 9.0.1+dfsg-2

Tcl (Tool Command Language, often said “tickle”) was created by John Ousterhout at UC Berkeley in 1988 as a small language to embed in other programs. With its Tk toolkit it became a quick way to build desktop interfaces, and it still runs inside chip-design tools, network test equipment, and Expect, the classic tool for scripting interactive programs.

Tcl has almost no syntax. Every line is a command followed by its arguments, and every value is a string. $name substitutes a variable, [command] runs a command and substitutes its result, and {braces} quote text without substituting anything. Even if and while are ordinary commands that take their bodies as braced strings. Arithmetic happens only inside expr. Lists and dictionaries are built in; Tcllib, the large add-on library with statistics and matrix packages, isn’t installed here.

Quirks

Concepts in Tcl

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every Tcl example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language tcl