The future is bright for Tcl! You’d be pardoned for thinking otherwise. It’s not a sexy new language. In fact, it’s ranked outside the Top 50 in the TIOBE Index. But for the right projects – and there are lots of them – it’s a powerful tool that’s been stress-tested for many years and just gets the job done.
Tcl is not resting on its laurels. The simplicity of the Tcl language makes it perfect for Internet of Things (IoT) and electronics design, including Electronic Design Automation (EDA), chip design, and Field-Programmable Gate Array (FPGA) development, and for configuring chips after manufacture. The same features that make Tcl dominant in EDA and FPGA also make it great for DevOps, potentially competing with Bash and Perl as the language of choice for configuration and management of developer operations systems. The power of the GUI and its separation from the compute structures makes Tcl an amazing choice for prototyping. With a port of Tcl/Tk to Android, rapid prototyping can also be done on mobile.
We recently spoke to Clif Flynt, President and CTO of Noumena Corporation, to get his view on the future of Tcl. Clif is the author of the TclTutor package and the books Tcl/Tk for Real Programmers and Tcl/Tk: A Developer’s Guide. In addition to extensive programming work on Tcl, Clif offers Tcl/Tk training sessions with in-class exercises.
Clif first learned to program in high school in machine language on a Monroe 600 programmable calculator with 6 nixie tubes and hand-punched cards. He taught it to play Tic-Tac-Toe–according to him, “badly.” In college he flipped to the opposite end of languages and learned APL.
Clif started programming professionally in FORTRAN in 1978 and quickly added assembler, BASIC, C and C++ to his repertoire. He started shell programming in 1985, picked up Perl in 1995 and finally Tcl in 1996. He’s been a Tcl devotee ever since.
With Clif’s extensive background, we asked him about the future of Tcl. Here’s seven reasons why the future of Tcl is bright.
1: Tcl is still the king of rapid prototyping
Clif is a big fan of Tcl for rapid prototypes that actually work. NBC Broadcasting studios uses Tcl/Tk to control what you see. They went to GE Research (and others) with a half-baked design and some examples of the clipboards and tapes they were using. The GE engineers took those and hacked out a quick Tk app that had a working clock and could pop up messages like “Commercial break – 30 seconds,” “Resume program,” etc., to demonstrate how it would look and work.
They did this while the sales guys and NBC managers were discussing what a potential schedule would look like. To quote the guy who ran the project, “When you’ve got a working prototype before there’s a schedule, you’ve cinched being awarded a contract.”
Clif himself states:
“That’s what attracted me to Tcl/Tk. I spent the 1980s and early ’90s developing applications in C, C++, MS Windows and X-Windows. After a few days with Tcl I was building apps in an evening that I’d been budgeting months for.”
2: Tcl is amazing at prototyping Android and IoT apps
Christian Werner introduced Tcl/Tk on the Android platform in early 2014 and that opened a big domain for full-functioned applications that you can develop in an evening or two. One of the big challenges with using Tcl for mobile was in optimizing it for long battery life. Tcl is getting many enhancements to make it a good fit for Android mobile devices. For example, Bluetooth 4.0, also known as Bluetooth Low Energy, is supported by Tcl external libraries in Android versions from 4.3.
3: Tcl is awesome for UX-focused design models
One of the design paradigms that Tcl was early to adopt is the hybrid app, where some of the functionality is handled in a compiled language while the user interface and config options are handled in an interpreted language.
The strength of this design is that the computationally heavy parts of a program are generally well understood and stable, while the GUI and options grow as users become familiar with a product and try to do more with it. Thus, putting the stable parts of the code in slow-to-develop compiled languages and the dynamic parts in an interpreter gives development and runtime advantages.
4: Tcl is perfect for DevOps tools configuration
5: Tcl dominates the EDA and FPGA markets + leverages hot IoT trends
You’ll get no argument, Tcl is solid as a mature language in vertical testing and EDA markets. It’s embedded in a lot of commercial products where the users never know Tcl exists. Cisco, for example, uses it extensively internally. Tcl is also the base scripting language for some Cadence tools, Mentor Graphics ModelSim, HP and IBM EDA design.
And this isn’t just FPGA: it’s all electronic design, including CMOS, NMOS, GaS, etc, which means as sensors and smaller smart connected devices proliferate, Tcl’s utility will continue to spread. Tcl will be an important tool for building IoT devices.
6: Tcl gets the job done, hidden in plain sight
People use Tcl to get the job done and are often quiet about it. For script programmers, Clif finds that Tcl is popular among engineers or scientists who program and get their job done quietly. Companies using Tcl include A10, Cisco, Fidessa (financial software) Flightaware, F5, Massive (Orcs in Lord of the Rings), and Tivo. Tcl is used in NASA missions and CAD for automotive design. A lot of the telephone voice recognition units use Tcl for things like: “Para Español, Marque Número Dos.”
7: Tcl can be taught quickly and is supported with commercial tools
Based on Clif’s extensive experience training people on Tcl, he knows that students “can come up to speed in a day.”
Clif offers Tcl/Tk training sessions with in-class exercises. He gives the students a commercial editor, optimized for Tcl programming, called Komodo. They use it during the training because it provides them with simple syntax checking as well as command completion. These two features are extremely useful for beginner users who forget syntax or how to spell a command. It enhances their ability to concentrate on problem solving with the language, instead of wasting time looking up options or argument order. ActiveState, the developers of Komodo IDE also make a commercial, fully supported distribution of Tcl called ActiveTcl, which is also available for free for community (individuals and non-production) use.
Tcl: the right language in many cases
Tcl is simple to learn and simple to use. Although this simplicity has potential downsides with large projects, it’s a huge advantage for rapid prototyping and as a configuration language. Tcl is a mature language with mature tools. Commercial support is available for both the tools and the language distribution itself. Tcl is being used in new areas such as DevOps and configuration.
The future really is bright for Tcl, a language that gets it done without a lot of flash. And it’s been doing so for a long time. If you don’t already know Tcl, you should give it a look. If you’re already familiar with Tcl, say hi to your old friend again. You’ll remember how good it feels to get working projects done in a day.