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

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.


July 18, 2003
URL:http://www.drdobbs.com/book-review-practical-programming-in-tcl/199102540

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

Read Sample Chapter

 

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.

 

Multi-threaded Tcl Scripts

Excerpted from: Practical Programming in Tcl and Tk, 4th ed.
by Brent Welch, Ken Jones, and Jeff Hobbs

Published by Prentice Hall PTR, June 2003

For more information or to purchase this book:
please visit: http://www.beedub.com/book/

Read Chapter 21: Multi-threaded Tcl Scripts

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.