LIITE 1
This interview took place on June 27, 1996 at Dr. John Ousterhout's office
at Sun Microsystems Laboratories, Mt. View, California. Dr. John Ousterhout joined SunLabs as a Distinguished Engineer in 1993. John came from the University of California at Berkeley where he was the main creator of Tcl/Tk. John was interviewed by Jakob Nielsen, Distinguished Engineer at Sun Microsystems. Jakob also included the most pertinent questions from readers of Tcl/Tk newsgroups.
Jakob: Why did you develop Tcl? Was any specific project the catalyst?
John: I got the idea for Tcl after building several interactive applications for integrated circuit design. Each had its own special-purpose command language and they were all pretty bad. The goal for Tcl was to build a good command language that was also reusable, so that I could take advantage of it in all my future applications. Jakob: Why should a programmer learn Tcl if they already know traditional programming languages? John: The most important reason to learn Tcl and its companion toolkit Tk is that they provide the fastest and most powerful way to build graphical user interfaces. You will finish the job ten times faster than if you used a toolkit based on C or C++. Tcl also works great with applications written in other languages such as C or Java, for example to add a scripting or extension facility or to build a test harness.
Jakob: Just how fast can you build a GUI with Tcl?
John: That depends on what you're building, of course, but we've heard many fascinating anecdotes from people. For example, one person spent six months building a C++ application and had written 15,000 lines of code. He rewrote the application with only 750 lines of Tcl code in a few weeks, and the new app was more powerful than the C++ application it replaced. Jakob: Would you advise people to start with Tcl as their first programming language? John: I didn't conceive Tcl as a language for people who have never programmed before, so I'm not sure it is the ideal language for novices. On the other hand, many people use it who would not write programs in C or C++, and the basic features of the language are simple and can be learned quickly.
Jakob: What is your advice to a programmer who wants to learn Tcl?
John: Find other programmers who know Tcl and have them sit down with you for an hour or two to introduce you. The second best way is to get one of several available books on Tcl. If you are particularly ambitious and already a good programmer, you can download Tcl over the network and learn it by looking at some of the sample scripts.
Jakob: Is there a favorite project that people often use as their first project?
John: There is no one thing, but perhaps the simplest and most common is to take an existing program that wasn't written to have a GUI interface, wrap it up in Tcl, and put a GUI interface on it. Jakob: How is a scripting language like Tcl different from a traditional programming language? John: A scripting language is used to write relatively small programs that assemble large pieces of code that have been written by other people. In other words, the basic building blocks are very large pieces of code, and scripts are used for "glue". On the other hand, with a system programming language such as Java or C, you're manipulating small things-integers and small objects, not windows and applications. Furthermore, the programs written in a system programming language tend to be much larger than those written in a scripting language.
Jakob: What is the relationship between Java and Tcl?
John: Java is a system programming language, ideal for building large components, and Tcl is a scripting language, ideal for assembling those components into exciting applications. Historically, programming languages have come in pairs-a system programming language and a scripting language. The relationship between Java and Tcl is similar to the relationship between C++ and Visual Basic. C++ and Java are system programming languages, and Visual Basic and Tcl are scripting languages. In the 21st century, Tcl will be to Java what Visual Basic has been to C++.
Jakob: What are the advantages of Tcl over Visual Basic?
John: Although they have similar capabilities, Tcl is simpler and more powerful than Visual Basic. In addition, Tcl is portable and runs on all Internet platforms, both servers and clients. Tcl also has the security model needed to ship code around the network and to execute code safely on the other side. These are the same benefits Java provides over C++. Jakob: You mentioned Tcl's security model. How are you going to convince people that they can get Tcl scripts over the Internet and run them safely? John: The only thing that will convince people a language is safe is years of use without any major disasters. However, Tcl has perhaps the best security model anywhere on the Internet. It is a familiar model that Tcl has generalized in a simple way.
Jakob: Has anybody successfully tried to break Tcl security?
John: The attacks have come mostly from friends. And we have caused denial-of-service attacks-things that cause a workstation to crash as opposed to corrupting files or leaking information. We are continually testing. There is no silver bullet that will solve the security problem, even with the best models.
Jakob: Will enhanced versions of Tcl soon be available for Macintosh users?
John: Yes. The ports to the Mac and PC are still in progress. Although functional, they do not use the native look-and-feel yet. Our next release will provide this capability. Then, Tcl scripts will run anywhere and use the native look-and-feel of platforms on which they are running.
Jakob: When will Tcl have cross-platform support for drag-and-drop?
John: Once the native look-and-feel issues are settled, drag-and-drop is next. I hope it will be out in 6 to 12 months.
Jakob: What about a bytecode compiler?
John: Currently, we are hard at work on the bytecode compiler. Preliminary performance measurements suggest we will get a 10 to 20-fold speedup on a large variety of Tcl scripts. We should have a battle-hardened first release in nine months.
Jakob: What limitations are imposed when you run the Tcl plugin for Netscape?
John: Right now, several limitations in the Tcl plugin are there to err on the side of security. For example, you can't create new independent top-level windows, you can't create menus, and you can't open sockets. We expect to re-open some of these features with safe implementations as we continue to polish the security model.
Jakob: What do you see happening to Tcl in the next five years?
John: I would like to see more development tools for Tcl, such as better debuggers and GUI builders. Several such projects are underway in my group, but they won't be mature for a while. I also would like to see general Tcl usage increase.
Jakob: How do you think the Internet will change with increased use of Tcl?
John: Many more programs will work together where they didn't before because Tcl is such an excellent glue language-it is really what Tcl does best.
Jakob: What are some successes of your current user community?
John: Tcl has been used in a wide variety of applications. The success stories range from Internet commerce applications to real-time control systems for a nuclear power plant and an offshore oil platform to widespread use for telescope and radar dish control in government research labs. Users are developing molecular modeling simulations, system-administration software for Oracle's database systems, and network-control software for Cisco routers. Jakob: Can you give us an example of a Tcl application you never anticipated, and an example of an application which is perfect for Tcl? John: The Shell oil-well-platform control software, which is in real-time, is a use I never anticipated. Tcl wasn't really designed to be real-time software-or so I thought. Also, I never thought Tcl would be used for systems of such large size - about a half million lines of code. Tcl is perfect for testing network routers. Tcl applications are started up all around the network and then Tcl scripts are shipped from a central control site to many other sites, which then under the control of the Tcl scripts bombard the router with packets. The results can be analyzed back at the central site.
Jakob: What type of company is a good candidate to use Tcl?
John: A company that builds a lot of small- and medium-sized applications, particularly for system administration and network management. Also, Tcl is ideal for a company with a cross-platform environment, such as a client-server system with UNIX servers and PCs and UNIX on the desktop. In addition, if a company has existing programs written before graphical user interfaces or the Internet, Tcl very easily embeds GUIs or Internet support into those applications.
Jakob: Should the end user care whether programs are written in Tcl?
John: In general, end users care only about functionality. Tcl allows developers to implement that functionality much more rapidly than with a system programming language. For power users, Tcl provides the ability to extend their applications because it's an interpreted language.
Jakob: How big is your development team?
John: About ten other engineers besides myself work on Tcl.