ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Google+ ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1918 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Title:
Practical Programming in Tcl and Tk (3ed)
Author:
Brent Welch
ISBN:
0 13 022028 0
Publisher:
Prentice Hall
Pages:
772pp&CD
Price:
£35-99
Reviewer:
Joe McCool
Subject:
unix
Appeared in:
13-2
Yes, I can recommend this book and it justifies its third edition. I am not an expert on Tcl/Tk and welcomed this text for that reason. Using the CD enclosed I was able to install the applications on my Linux box and Welch took me through the early stages of getting the language up and going. I can see that over the next year or two my copy is going to be well thumbed.

What are Tcl and Tk? Tcl is a scripting language, like so many others. But what sets it apart is the ability to add a Tcl interpreter to your applications. Tcl acts like glue between applications. 'Tcl fills the role of an extension language that is used to configure and customise applications.' Editors and terminal emulators have been written in Tcl. Tk is its graphical manifestation. Something the author appears to have missedis that Tcl/Tk seems to have found a new open source home on ActiveState (seehttp://www.activestate.com/initiatives/tcl.html).

Amongst the code I did find the occasional error, but these were all flagged up on the author's web site (http://www.beedub.com/). He uses some very neat, though not original, tricks to fox the OS into executing long path names in running the shell (he uses extended comments to do this - fascinating) and this (page 17) to comment out large sections of code

if {0} {
unused code goes here

}

A trick like this could be used in many languages.

Welch covers Tcl right up to version 8.3. It is not a book of general interest and will appeal only to those closely involved (or about to be) in Tcl coding or to those who wish to dabble (in UNIX GUI prototyping for example).

Of particular interest to readers of these columns is his treatment of the Tcl in C programming. Here he explains that there are two basic approaches; 1. write extensions to add commands to the standard Tcl shell and 2. add the Tcl library to an existing application. The first one is the easiest. Chapter 44 treats both the original string based command interface and the version now available in 8.0, which is a more efficient dual-ported object interface. This is not for the lighthearted. All the examples are in pure C, not C++ and at times I was struggling to see the shape of an overall (main) example as distinct from numerous libraries.

This section on C programming is clear and well done. Welch points the reader to David Beasley's SWIG which generates C code to implement command procedures, exposing C and C++ APIs as Tcl commands.

The index is good and he makes reference to numerous web sites and news groups. Regular expressions, an essential part of any scripting language, are well treated.