Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Book Review: Practical Programming in Tcl and Tk, 4th ed.


July 2003

Book Review: Practical Programming in Tcl and Tk, 4th ed.

by Cameron Laird

Practical Programming in Tcl and Tk, 4th ed
Brent Welch, Ken Jones, and Jeff Hobbs
Prentice Hall PTR, 2003
ISBN: 0130385603
960 pages

 

For almost four years, Brent Welch's Practical Programming in Tcl and Tk (in its third edition) has been the book most often recommended by my Tcl-programming friends. The fourth edition just appeared, and it's immediately vaulted to the top of that list.

That's most of what you need to know about Practical Programming in Tcl and Tk. A small number of Tcl books are in print; almost all are good, some even excellent. Expert Tcl developers, though, generally agree that Welch's is the most comprehensive and advanced.

Plenty of life

Is there a need for Tcl books, though? Isn't it, as widely rumored, a language in decline, destined to be replaced by such younger rivals as Python and Java?

Yes, it's undeniable that the popularity of at least a handful of other languages has passed Tcl's, and the comparative gap might continue to grow. No, this doesn't mean that Tcl is on a course to imminent extinction. Python actually builds in a copy of Tcl, and influential Java open source tools such as Jikes rely on Tcl for their quality control. Every month, Tcl-based applications go into production, sometimes in programs that are expected to work for decades. Cisco embeds Tcl into thousands of routers, the language has gone to Mars at least once, it's apparently (judging from unclassified information) a "mission-critical" component of submarines and other military craft, it plays a crucial role in very large and serious telephony, financial, design, and manufacturing programs, and key products from such heavyweights as Oracle, IBM, and AOL also rely on Tcl. Several of the applications I've personally delivered are scheduled to continue in production at least through the end of the decade.

These examples suggest one of Tcl's strengths — it's trustworthy, at least as much so as any common language. Tcl programs can reasonably be expected to run for years at a time, and compatibility between successive releases is high. Tcl has been rather conservative, adding new features at a deliberate pace, always with an eye to maintaining the exceptionally "clean", well-documented core implementation.

That makes the language sound stodgy. It's not (not the way other slowly changing languages would be), because it's not just a language like other programming languages.

"Technology" of cooperation

From the beginning, Tcl was more "technology" than language, the technology of playing nicely with other components. Tcl's design has always emphasized ease of interfacing to other languages and applications; for many years, Tcl experts expected good programs would combine pieces written in Tcl and other languages. Only in the years after publication of Practical Programming in Tcl and Tk's first edition (in 1995) did it become common to regard Tcl as a viable "standalone" application development language.

This results in hidden strengths for Tcl. It has become a fine application language, with particular advantages in its Unicode support, easy networking, security model, concurrency performance, graphical user interface (GUI) integration, and other specific dimensions. Beyond those conventional comparisons with other languages, though, Tcl still benefits from its original heritage. It's flexible and portable, working well inside Web applications, GUIs, command-line applications, on all sorts of platforms (from hand-helds and embedded devices, to "enterprise-class" hosts). More than that, though, it continues to make good partnerships with other technologies. It combines particularly well with other languages.

Practical Programming in Tcl and Tk documents those intriguing possibilities better than any other book. It's always been a readable and well-structured book, the authoritative guide to the language. Author Brent Welch worked on the language with its inventor, John Ousterhout, almost from the beginning. He's released such widely used open source projects as the exmh e-mail client, and remarkably compact and zippy tclhttpd Web server.

For the fourth edition, Jeffrey Hobbs and Ken Jones joined Welch as co-authors. Hobbs is the Tcl lead at ActiveState Corporation, where Tcl development centers, and Jones is the most successful U.S.-based Tcl trainer. Along with their complementary expertises, the current Practical Programming in Tcl and Tk boasts currency on the latest Tcl release, 8.4, with entirely new material on multithreading, new 8.4 widgets, and the exciting Starpack deployment innovation. Publisher Prentice Hall also moved the fourth edition to new production materials; it's physically smaller than the third edition, but appears to be even more durable to the hard use it receives. Early editions of Practical Programming in Tcl and Tk were often loved to tatters because programmers found it such a valuable reference.

Room for others

Practical Programming in Tcl and Tk doesn't answer all Tcl questions. When I visit client sites, I generally carry the more compact Tcl/Tk Programmer's Reference. Specialists in Web development will probably want to start with Web Tcl Complete (McGraw-Hill), systems administrators particularly take to Exploring Expect, and beginners to programming are best off starting with a gentle treatment like Graphical Applications with Tcl and Tk. Several other volumes aptly fill still other niches.

For the majority of working developers, however, Practical Programming in Tcl and Tk is the best place to learn what the latest Tcl can do, and how to do it.

Vice President of Phaseit, Inc., Cameron Laird frequently reviews books for UnixReview, and co-authors the monthly "Regular Expressions" column. Many of the applications he develops for Phaseit are written at least in part in Tcl, and he's contributed code and documentation back to the Tcl project since the mid-'90s.

 


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.