, Eric S. Raymond
, presented a critique of Tcl. This page presents an excerpt from the printed edition containing the critique, followed by a response to it. This excerpt has been slightly updated in the online version of the book.Excerpt edit
TclTcl (Tool Command Language) was designed for writing small programs and embedded scripts (that is, scripts called from within C programs and returning values to those programs). Tcl has become popular not so much for itself as for several facilities that have been built on top of it. The two most important of these are:- The Tk toolkit, a kinder and gentler X interface that makes it easy to rapidly build buttons, dialog boxes, menu trees, and scrolling text widgets and collect input from them.
- Expect, a language that makes it relatively easy to script fully interactive programs with widely variable responses.
, http://purl.org/tcl/wiki/
, and http://www.purl.org/NET/Tcl-FAQ/
.Tcl implementations exist for Windows 95 and Windows NT. Tcl/Tk scripts will run cross-platform with GUI capabilities.Case Study: TkManTkMan is a browser for Unix man pages and Texinfo documents. At roughly 1200 lines, it is quite large to be written in pure Tcl, but the code is unusually well-modularized and mature. It uses Tk to provide a GUI interface quite a bit nicer than either the stock man(1) or xman(1) utilities support.TkMan makes a good case study because it exhibits almost the full gamut of Tcl techniques. Highlights include Tk integration, scripted control of other Unix applications (such as the Glimpse search engine), and the use of Tcl to parse Texinfo markup.Any of the other languages would have made for a less direct interface to the Tk GUI that constitutes most of this code.A Web search for “TkMan” should turn up sources and documentation.Moodss: A Large Tcl Case StudyThe Moodss system is a graphical monitoring application for system administrators. It can watch logs and gather statistics for MySQL, Linux, SNMP networks, and Apache, and presents a digested view of them through spreadsheet-like GUI panels called ‘dashboards’. Monitoring modules can be written in Python or Perl as well as Tcl. The code is polished, mature, and considered an exemplar in the Tcl community. There is a project website.The Moodss core consists of about 18,000 lines of Tcl. It uses several Tcl extensions including a custom object system; the Moodss author admits that without these “writing such a big application would not have been possible”.Again, any of the other languages would have made for a less direct interface to the Tk GUI that constitutes most of this code.Trends for the Future[snip]Tcl has been in a period of relative decline, or at least of diminishing visibility. New Tcl releases since 8.0 have added little to its capabilities. In 1996 a widely-reported and plausible estimate of community sizes held that for every Python hacker there were five Tcl hackers and twelve Perl hackers. Today, judging by search results at SourceForge, Tcl and Python have switched places.As the above indicates, Python has risen in popularity as rapidly as Tcl has fallen. Though the Perl community is still quite a bit larger than Python's, a visible tendency of the brightest Perl hackers to migrate to Python has been rather ominous for the former language -- especially as there is no migration at all in the opposite direction.

