PosiTcl

Purpose: this page tries to present some facts about Tcl/Tk, and to bring across what people using it consider the essence - the Zen even? - of this scripting language and tool

PosiTcl means whichever you prefer: Positioning Tcl, or Positive Tcl


  • Tcl is a Scripting language like Python, Perl, Lua, and others
  • Tk is a GUI which has also been tied to Python, Perl, Scheme, ...
  • As of version 8.0, Tcl compiles to bytecodes on the fly
  • Unlike Perl, this happens not only on startup but occasionally later
  • Unlike Python, compiled bytecodes are not saved to file
  • Tcl/Tk 8.x runs on many Unix systems, Windows 9X/NT, Mac
  • As of release 8.1, Tcl/Tk has become Unicode-aware
  • Tcl/Tk is freely available, including source, with a BSD-like license
  • Other links: Tcl/Tk overview [L1 ], success stories [L2 ], Who Uses Tcl, TclBlast! CD-ROM (does anyone still sell this?

  • For me, one of the most important features of Tcl is that no command has any special syntactic favours granted to it (except via compiler bugs! :^) and you can easily create your own commands to replace those in the core. This allows the same script to be used for two radically different purposes, just by loading a different preamble in each case (e.g. have a script that generates a complex GUI or outputs the dynamic help strings embedded in that GUI suitable so that it is easy to ensure that the documentation is in sync with the product.) I suppose this is also an instance of the code/data duality, which is unusually strong in Tcl. - DKF
  • Oh, and the stack trace when you get a core dump is easily understandable too (an advantage cited to me by Ian Jackson - more commonly known for his efforts relating to Debian GNU/Linux). DKF
  • Tcl's event-oriented programming is well-done.

  • Tcl and Tk are linkable libraries, so you can embed a command processor into your application. You can even use Tcl as a data file parser. - RWT
  • Tcl and Tk have command shells that can run your scripts as standalone programs. You can even "wrap" scripts, libraries, and command shells together to make an executable that runs on any computer (of the same type) without installing Tcl/Tk. - RWT
  • Tcl and Tk both have interactive command shells, so you can just type in commands to see how they work. This is a big help when programming. - RWT
  • See Tcl Advocacy for more information - LV

  • Tcl trace variable, event style programming, and Tk widgets are magic for most applications level programmers

I implemented our socket based client/server API in Tcl and then wrote an simple proc "msg_variable" to connect the value of one variable (in the server) to the value of another (in the GUI client). Most of the programmer/scientists who work with me consider the entire affair to be magical. Values are read by machines and processes in the lab and appear on the screen without conscious effort. This is all made possible by the facilities in Tcl/Tk. The messaging implementation is more than 3000 lines in C, but less than 1000 in Tcl. The Tcl version has better debugging, logging and more capability. -- JBR jcw: edit this as you will to make it less anecdotal if you like.


If you change this page, please note that:

  • it is about what Tcl is and is not, as factually as possible
  • it has a few links to key Tcl positioning/highlight pages
  • if people perceive this as an advocacy page, it will have failed
  • there is no criticism of other languages (not on this page)
  • phrases such as "unlike X, Tcl does/has Y" are ok, to clarify