Linked by Eugenia Loli on Thu 8th Jun 2006 16:32 UTC
General Development Most computer users interact with their workstations primarily through some form of graphical user interface (GUI). In the world of Microsoft Windows, this interface is tightly controlled. The UNIX world, by contrast, offers a veritable smorgasbord of different GUIs with varying degrees of functionality. They range from minimalist window managers, such as twm, to large, capable tools, such as GNOME and KDE (K Desktop Environment). This article shows you how the Tcl/Tk scripting language offers a simple and elegant way to code GUI widgets with minimal effort.
Permalink for comment 131997
To read all comments associated with this story, please click here.
still some tricks up its sleeves...
by mdingler on Fri 9th Jun 2006 16:40 UTC
Member since:

I've done quite a lot of Tcl/Tk in the days when it was one of the major GUI players on Linux ('94? No Qt, no Gtk, just Motif and XForms). Yet better stuff came up and I didn't touch my Ousterhout book for quite some time.

But recently I've done some work in this area again, and while I'd agree that the language looks rather simplistic and the GUIs show their age, there's still quite a lot of hidden power behind that facade.

Agree, compared to syntactical monstrosities like Ruby and Perl, Tcl looks quite anemic and wordy at times (expr...). But due to the fact that it just has those simple rules and excels at string transforms, it's pretty versatile once you actually start to program the interpreter. In this regard it's quite similar to Lisp, yet more focused on strings than list/tree structures.

If you take a look at the Tcl Wiki, you'll find several OO systems, all written in Tcl itself. And the resulting syntax manages to look pretty "native", not as artificial as Perl does sometimes.

The interpreter is quite fast, the event handling mechanism is excellent and with Tile, the GUIs actually manage to look half-way decent.

As with Perl, Tcl has no big standards, so you'll have to grab your additional widgets, your OO system and everything yourself. This requires a lot of work, younger langauges like Ruby and Java have a higher degree of standardization. Whether that's wholly good or bad is another matter for discussion.

All in all, Tcl is worth a second look. Not the programming language panacea, but at least a source for some ideas...

Reply Score: 1