B.1   Why Tcl?

Much of the Tornado implementation is written in Tcl (the tool command language designed by John Ousterhout). Readers who are already familiar with Tcl applications are not likely to find this surprising.

However, if Tcl is new to you, you may be wondering why. Choosing Tcl as the implementation vehicle has the following benefits:

  • Customization:.  
    Tornado can be customized to an unprecedented degree. All tools can be conditioned with Tcl scripts. At a deeper level, the Tcl code for the tool itself is available for your inspection. This allows you to more easily write your own Tcl code to modify any features you wish to change.


  • *

    CAUTION: When you customize Tornado tools, write your changes as separate files that override the original tools. That way, Tornado WRS technical support can still help you, if the need arises; and it will be easier to preserve your enhancements over new releases of Tornado.

  • Development speed and robustness:.  
    Because development in Tcl is interactive, graphical-tool design can include much more experimentation in the development cycle. This means we at WRS can build products faster, and we can build them better, checking our results as we go. Third-party developers experience exactly the same benefits. All of this means that you, the VxWorks application developer, have more and better tools available to choose from.

  • Ease of maintenance: .  
    Because Tcl code is ordinary text, optional products and third-party add-ons can integrate themselves into a Tornado installation by including Tcl files that customize the launcher or other components. If necessary, WRS Technical Support can also send out field-installable patches in electronic mail.

  • Portability: .  
    Implementing the graphical user-interface building blocks as Tcl extensions makes it possible for WRS to support more kinds of host platforms more quickly, because the transition between windowing systems (otherwise often difficult) is encapsulated into a series of well defined internal calls.

  • Tcl is a scripting language which is designed to be embedded in applications. It can be embedded in applications that present command-line interfaces (the Tornado shell, for example) as well as in those that do not (such as the browser). Almost any program can benefit from the inclusion of such a language, because it provides a way for users to combine the program's features in new and unforeseen ways to meet their own needs. Many programs implement a command-line interface that is unique to the particular application. However, application-specific command line interfaces often have weak languages. Tcl holds some promise of unifying application command languages. This has an additional benefit: the more programs use a common language, the easier it is for everyone to learn to use each additional program that incorporates the language.

    To encourage widespread adoption, John Ousterhout (the creator of Tcl) has placed the language and its implementation in the public domain.

    Tk is often mentioned in conjunction with Tcl. Tk is a graphics library that extends Tcl with graphical-interface facilities. Tornado does not currently use Tk, but you may find Tk useful for your own Tcl applications.