''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''' [http://www.multicians.org]): * "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 [http://www.multicians.org/multics-commands.html] * commands that start with the standard streams for '''standard_input''', '''standard_output''', and '''error_output'''[http://www.multicians.org/mgs.html#standardoutput] * 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 [exec]ification 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''' [http://www.multicians.org/mspm-bx-1-00.html] shell [http://www.multicians.org/shell.html]): * the names ''tclsh'', ''[wish]'' (specifically the ..sh ;-) '''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--but see below) * # 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) '''Assembler:''' * ''incr'' (GfA Basic had that too, but assemblers were way earlier ;-) '''Awk/Lex/Egrep:''' * regular expressions, ''[[regexp]]'', ''[[regsub]]''. (But ''[[switch -regexp]]'' really feels like something from Snobol or Trac!) '''Awk:''' * associative arrays (Yes, I know, Snobol had them first, too!) '''C''': * ''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..) '''C++''': * the name::space syntax (not exactly the most beautiful, tho) '''FORTRAN''': * parens as marker for array elements (but different functionality) * ''if'' statement (well, they had that earlier than C ;-) '''LISP''': * 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 '''SCL''' * [[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?]] '''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) * [uplevel], [upvar] * [info] * [trace] [[Note that [ksh] had traces--"discipline functions"--in 1988.]] ---- It strikes [CL] that grouping is crucial. Tcl's like Forth, Lisp, shell, and so on, but it elaborates "grouping" (what might be lexification in other languages) more than any other. C and TeX were two quite different predecessors that both use {} for a conceptual variety of grouping operations. m4 has `', rather clumsily. ---- 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]