Version 14 of Tcl Heritage

Updated 2003-03-18 18:04:21

Purpose: meditate on how other systems/languages shaped Tcl -- started by Richard Suchenwirth - please add what you think! Of related interest is the Tcl chronology.

UNIX (borrowed from Multics [L1 ]):

  • "everything is a string" (at least command line arguments, argv)
  • the environment as a string->string mapping (::env array in Tcl)

Multics Command Language

  • cwd, pwd, and command execution [L2 ]
  • separation of commands by semicolon or newline
  • separation of parameters by whitespace
  • expansion of embedded commands [..] before calling the first command
  • # as comment marker
  • grouping of words with ".." and `..'
  • method of searching for unknown commands when encountered during processing (what's the exact concept here? Is it the implicit execification when running in the interactive shell? A more proximate source for that might be the Unix shells, or even Rexx. The concept is dynamic linking. When there is a command encountered that is not found, then the search rules are used to find a segment that defines the command so that it will be dynamically loaded. This dates from the mid 1960s, and I believe before the Unix shells.)
  • dynamically loading and linking commands
  • replacement of loaded procs with new ones while still running

UNIX shells (borrowed from Multics Command Language [L3 ] shell [L4 ]):

  • the names tclsh, wish (specifically the ;-)

Bourne family of shells (sh/ksh):

  • cd, pwd, exec
  • separation of commands by semicolon or newline
  • separation of parameters by whitespace
  • expansion of parameters before calling the command
  • expansion of embedded commands (.. in shells, [..] in Tcl which nests better) before calling the first command
  • expansion of variables with $ ($x as shortcut for [set x]; not in earliest Tcl, but introduced by Karl Lehenbauer)
  • grouping of words with "..", which allows expansion
  • grouping of words without expansion (Unix shells use '..', Tcl has {..} which nests better)
  • # as comment marker
  • redirection of stdout and stdin

BSD's csh family of shells:

  • tilde expansion (~suchenwi or ~/bin..)
  • redirection of stderr
  • history command

UNIX tools:

  • expr (though Tcl's is much more powerful)
  • dash as switch marker (ls -l, glob -nocomplain)


  • incr (GfA Basic had that too, but assemblers were way earlier ;-)


  • regular expressions, [regexp], [regsub]. (But [switch -regexp] really feels like something from Snobol or Trac!)


  • associative arrays (Yes, I know, Snobol had them first, too!)


  • stdin, stdout, stderr
  • argv (argc unneccessary, we have [llength $argv])
  • for loop, while
  • fopen, fputs, fgets, fclose, ftell - minus the leading f
  • sprintf is format, especially the format string syntax
  • putting code blocks in braces (but much more generalized in Tcl)
  • expr syntax (infix operators, functions, parens..)


  • the name::space syntax (not exactly the most beautiful, tho)


  • parens as marker for array elements (but different functionality)
  • if statement (well, they had that earlier than C ;-)


  • lists as major data structure (though not implemented as chains of cons cells)
  • dynamic handling of list lengths
  • Polish notation, command is always first word
  • dynamic binding of commands, rename, replacing proc's at run time, code as data, [eval].

[Incr Tcl]

  • Namespaces

X Window System:

  • the event model (as opposed to either multithreading or PL\I-style on-units).
  • resource "database"

(not sure) (but all quite important to the character of the language; we need to ask John or Brent or Karl)


  • [Sometime we need to ask JO about this.]
  • In the '70s (?), CDC's NOS/VE OS included System Command Language (SCL) which was embeddable and extensible. Applications and the OS could embed other applications (and the OS?) with pleasing symmetry and convenience.
  • [Was it Steve Lidie who observed this?]

Updates by: KBK (7 November 2000) - LV (Nov. 07/08, 2000) - CL (2001 ...) - escargo (Oct. 9-11, 2002)

See also Is Tcl different! - Arts and crafts of Tcl-Tk programming