Practical Programming in Tcl and Tk (4th Edition)

Author: Brent Welch, Ken Jones, Jeffrey Hobbs
List Price: $49.99
Our Price: Click to see the latest and low price
ISBN: 0130385603
Publisher: Prentice Hall PTR (10 June, 2003)
Edition: Paperback
Sales Rank: 5,435
Average Customer Rating: 3.96 out of 5

Buy now directly from Amazon.com - Purchase this book, safely and securely from the largest book dealer on the Internet, Amazon.com

Customer Reviews

Rating: 1 out of 5
Tcl trick collection!
(This review is for the 3rd edition of this book, and
I am only half way through the book.)
It is very hard to learn Tcl/Tk reading this book.
This book does not teach you THE language. It only
tries to teach you tricks and way arounds that could
be useful for someone already know Tck/Tk.
If the author have devoted a couple of early chapters
to explain the principles of the language, he wouldn't
have to write such a thick book full of only tricks.
Worse, the examples in the book are often not well
explained, and you have to jump around the chapters
to read the examples because most examples use commands
that are introduced in later chapters.


Rating: 2 out of 5
Not very good for learning Tcl, and not a good reference
First, let me preface my review by saying that I am a professional C programmer, with a background in Perl and Sed/Awk, so I've been around the block a couple of times in terms of both structured programming languages and scripting languages. This is my first exposure to Tcl, and I must say I am rather disappointed.

This book does a terrible job in introducing the language in a structured, straightforward and reasonable fashion. The sparse examples included are oftentimes not explained in the text, leaving the reader scratching their head trying to figure out why the syntax gives the results that it does. The index is very spotty, leaving out reference to pages where important topics are discussed at length. There is no overall command or syntax reference page, so you'e constantly flipping through the book trying to find where a particular command is defined.

The CD included in the purchase price has got to be the most user-unfriendly collection of different versions of Tcl for different operating systems ever assembled. There's no installation program, so the reader is left trying to figure out what to put where on their computer. The "Getting Started" chapter in the text is supposed to guide you through this process, but because it has to deal with disparate systems and versions, is vague and generally unhelpful. Since Tcl is free anyway, and you're not likely to be using it without a computer that is connected to the Internet, why not just point the reader to the appropriate sites on the Web to download the latest versions of Tcl and Tk?

I wish I could say something positive about this book, but I haven't really found it yet. I think that it might actually contain some good practical information for more advanced users of Tcl, but for the beginner this book is a joke.


Rating: 5 out of 5
The Tcl Book
Tcl is a small (read "good" and "orthogonal"), stable, mature, and featureful language. And (to paraphrase Brian Kernighan, referring to his book The C Programming Language), it is served well by a, um, well not a small book, but by one book in particular, this one.

The Tcl programming language is perhaps the single most underappreciated and underestimated programming language currently in general use, followed a close second by Ruby (Ruby, is however on the ascent, while Tcl seems to be spiralling downward out of view, this second fact should be considered a criminal occurrence of the highest order, as we shall see). Tcl is, however, the language of choice for a number of very significant projects, AOL Server, IBM's WebSphere, and the data access and analysis system of the Laser Interferometer Gravitational Observatory are all Tcl projects of considerable magnitude. Tcl has been shown to be stable and scalable in these environments. I know, because I wrote the management layer for the LIGO data system, in Tcl.

Tcl has a few things in particular going for it that should, really, make it the first choice for system administrators and network application developers, in spite of claims made for these areas by another well known language.

What makes Tcl special? Well, first of all, the core language contains a nearly perfectly implemented socket abstraction layer that allows one to write network applications that are secure and well-behaved (and fast!) with great ease. Second, the language is designed around a thing called an event-loop that endows the language with almost magical multitasking power (without the hazards of threads).

Another attribute of Tcl, which frankly has no interest for me, but is possibly more significant for others than the things I have mentioned so far, is that an enormous effort has been made to make Tcl behave transparently under all flavors of UNIX, under (ugh!) Windows, and under MacOS. This interoperability extends to the Tk graphical windowing toolkit, which makes use of native look-and-feel on all platforms, and does an amazing job of it. The result is that, even more so than for JAVA, Tcl code will run right nearly everywhere. And the particular wonders of unices are leveraged using a single extension library, TclX.

Brent Welch understands these aspects of Tcl, and pretty nearly all of the others in great detail. And he makes his knowlege available and readily accessible in this book.

Over the course of 4 editions the Tcl language has grown and Brent has kept up to date perfectly. And the quality of the book has grown as well, with an (finally, geez, some of us were chewing off our fingernails over this one) excellent index, and a much improved binding and paper stock (the book lies flat on every page, except the first and last 24; damn good for a nearly 900 page book!)

The book is organised into seven logical partitions (with a thumb index printed on the page edges):

1. Tcl Basics - how to get started writing Tcl code in 2 minutes
2. Advanced Tcl - events, security, optimisation, and magic
3. Tk Basics - how to get started writing GUIfied apps in 10 minutes
4. Tk Widgets - the gory details of all options to the widget set
5. Tk Details - things that you can do to change Tk's default appearance
6. Tcl and C - The C API for extending and embedding Tcl
7. Changes - A comprehensive list of changes to the Tcl language and C api from Tcl version 3.6 (1985?) to 8.4 (2003). With porting tips!

If you only own one Tcl book (and, frankly, you only need one, because the Tcl language has few dark corners, and because the book is nearly perfect) this has got to be it. If you do not have this book you are not using Tcl to it's full potential.

A veritable treasure trove of Tcl code examples and expert help with Tcl and Tk is available at: http://wiki.tcl.tk

If you are not using Tcl at all, you are not coding as productively as you could be, and your networked apps are not as secure as they could be, and probably run damn slow (well, Apache with the Perl module is damn fast, but it has been my experience that the typical Perl cgi script is a security nightmare. It is easier to write a secure custom server in Tcl than to do the equivalent in Apache/Perl, though Apache does offer sufficient security options to keep the lid mostly in place, Perl is a sloppy language that seems to attract sloppy coders ;^)).

Similar Products

· Exploring Expect
· Effective Tcl/Tk Programming : Writing Better Programs with Tcl and Tk
· Tcl and the Tk Toolkit
· Tcl/Tk : A Developer's Guide
· Tcl/Tk Pocket Reference

Return To Main Computer Book IndexSearch Our Entire Computer Book Catalog