This page answers several high-level questions about Tcl and Tk. For more detailed questions, please see the Tcl FAQ pages. For another introduction to scripting and a comparison between Tcl and other scripting languages, please see Cameron Laird's article and his follow up web page, or the nice Tcl Overview by Eric Johnson. Brent Welch's Why Tcl page describes in more detail why he likes Tcl.

What is Tcl?

Tcl (Tool Command Language) is two things: a scripting language and an interpreter for that language that is designed to be easy to embed into other applications. As a language, it is much like UNIX shell languages. There is very little syntax and it is easy to learn. It is used to glue together building blocks built in system programming languages like C, C++, and Java. These building blocks appear as commands, or verbs, in the script language. It is easy to embed Tcl into a legacy program so you can script the behavior of that program and add in other building blocks like a GUI interface. The Tcl interpreter is written in C and has been ported to almost every computer platform.

What is Tk?

Tk is a window system toolkit for building graphical user interfaces. Tk adds Tcl commands that create and manipulate widgets (i.e., windows). Tk makes GUI programming very easy, but at the same time it offers fine grain control and some sophisticated widgets so you can create great interfaces. In particular, its text and canvas widgets are very powerful. The text widget supports multiple fonts through a tag facility. Tags apply to ranges of text and can have different appearances as well as event bindings. Canvas widgets provide display-list graphics so you can efficiently manage thousands of lines, rectangles, ovals, images, text items, etc. The canvas also uses tags so you can easily add behavior to these light-weight items.

Why are Tcl and Tk So Popular?

Tcl/Tk has gained widespread popularity since the first versions were distributed freely on the Internet. (See the history of Tcl releases.) The recent ports of Tcl/Tk to the Windows and Macintosh platforms have accelerated the use of Tcl/Tk in the market place. Tcl/Tk has several benefits: For many users it is the easy GUI programming with Tk that attracts them. Software testing organizations find Tcl very useful for building large test suites that exercise their C and C++ APIs. Web site developers use Tcl for CGI programming and interfaces to corporate databases. Consultants and system integration experts find it easy to rapidly construct large, custom applications for their clients. Finally, Tcl was designed to be easy to learn, and its C APIs were designed to make it easy to integrate Tcl with legacy code.

What About Java?

Tcl Blend and Jacl integrate Tcl and Java so you can have the best of both worlds. Tcl Blend facilitates the integration of Java with other legacy code by using Tcl as the glue between them. Jacl is a 100% Pure Java implementation of Tcl, although it does not have all the Tcl 8.0 features yet. A Tcl extension written in Java will work with either Tcl Blend or Jacl.

Tcl has several properties that complement Java nicely. First, Tcl is for scripting and Java is for systems programming. John Ousterhout has a great explanation of scripting vs. systems programming. Like Java, Tcl is platform independent so the same Tcl/Tk script can run unchanged on UNIX, Macintosh, and Windows. Like Java, Tcl has a built-in security model so that you have complete control over an incoming Tcl applet (i.e., Tclet).