Version 142 of Tcl Advocacy

Updated 2013-03-10 00:52:37 by pooryorick

Intro

Proponents of Tcl consider it a versatile, feature-rich, industrial strength programming language. It is renowned for its stability and utility. Tcl is used for for everything from quick systems administrative scripts to mission-critical control systems. It is simple to learn, and fun to use. This page enumerates the advantages and strengths of this unique language and provides an index of other resources that do the same.

Who Uses Tcl

see Who Uses Tcl

Wiki Pages Advocating Tcl

PosiTcl
Is Tcl Different!
I worry about Tcl's future

Articles Advocating Tcl

Expect Exceeds Expecttations
by Cameron Laird, argues that Tcl is "the one languge you need to know"
Five Surprises from Tcl
is a good read for programmers who don't work with the language but think they already knows its capabilities and limits
Tcl The Misunderstood
a marvelously-written piece by antirez
I Can't Believe I'm Praising Tcl
by Yossi Kreinin, 2008. The author describes his pleasant-reintroduction to Tcl
The five top objections to open-source
LV, In July, 2004, this Computerworld article answers common objections to the use of open-source software
Tcl Articles
may have a pointer to a language feature or successful project similar to those for which you are advocating Tcl.

Articles Criticising Tcl, and Responses to Them

pidors 2005-01-20: I just saw 10 Things I Hate About tcl show up in http://del.icio.us/tag/tcl . Would it be worthwhile to address his list? (though it is from Oct 2004, so one might consider it a stale part of the blogoverse). :)

George Peter Staplin: It seems to me that most of the arguments in that article could be solved by studying Tcl.n.

It seems that the author hasn't used programming languages unlike C. To find syntax errors before runtime execution we have tools such as frink. The delayed-evaluation/syntax-checking isn't a problem in most cases for me. I have, however, wanted the ability to fix the problem in a dialog (during the error) and continue execution after the change (like in Smalltalk, and Lisp), but this would require many changes to Tcl. Furthermore, regarding syntax analysis; I've written plenty of buggy programs that pass a C compiler's checks. Depending on a compiler to find bugs in a program can be a futile pursuit.

Testimonials

myvzw.com and Tcl
"If this isn't a testimonial to Tcl's prowess, I don't know what is."

Caj: When I evangelize Tcl, the number one argument I make is its complementary nature: it is excellent at precisely those things you hate to do in C, and writing in both languages together is really easy. Every coder at some point stares resignedly at a source file thinking, "I wish I could just write this part in perl." Tcl is a cure for exactly that writers block.

Strengths

Security
Tcl has security policies that let you decide what kind of operations are appropriate, including for user-provided code.
Rapid Development
Most programs are easy to write in Tcl because it works with numbers and strings and files and network connections, rather than with the bits and bytes and pointers of C, C++, and Java.
Code Reuse
Tcl's package system makes it easy to write code that can be reused. Many other people have made their code available for reuse.
Object Oriented
Tcl supports (through several public extensions, especially including stooop and [incr Tcl]) object oriented programming, but does not require it. You can have classes, objects, single and multiple inheritance, dynamic class definition, dynamic methods, and much much more.
Portable
Tcl runs on IBM mainframes and AS/400s, Windows NT, 95, 98, ME, XP, Windows/CE, OS/2, Novell Netware, Cray supercomputers, Digital's VMS, Tandem Guardian, HP MPE/ix, Mac OS, and all flavours of Unix, as well as dozens of smaller operating systems like Acorn RISCOS, Amiga and Atari ST.

Joe Mistachkin 2006-06-08: Based on my previous research (when I had access to the actual hardware), modern versions of Tcl have not been ported to HP MPE/ix. Please correct me if this is inaccurate.

Open Source
Anyone may, without charge, download and inspect the source code to Tcl. If you need to verify or certify Tcl internally, for instance for Year 2000 audits, you have immediate and full access to the internals of the language.
Internationalization and Localization support
Tcl's "mother tongue" is Unicode, so just about all living writing systems of the world can be processed, provided you have fonts. Converting Unicode from or to just about any encoding is also very simple. See i18n - writing for the world or Is Tcl Different!.
Version invariance
This one is important, but hard to explain. Tcl has been maintained in a way that promotes forward- and backward-compatibility, at all levels, and the specific Stubs technical mechanism makes it automatic that compliant extensions work across version boundaries. While explanations of these advantages make most audiences yawn, they turn out to be enormously beneficial to real-world, working programmers.
Embed
Tcl Trivially embedded
Deploy
Deployment via starkit/starpack is a big advantage
Extend
easy to extend with C/Fortran
Handle Binary Data
Binary

Success Stories

Here are some big companies that have used Tcl successfully:

There are several success stories available at the Tcl Developer's Exchange website http://www.tcl.tk/about/audience.html

How to Advocate Tcl

Don't just defend Tcl, promote it!


peterc 2008-08-19: Another practical way to increase the visibility of Tcl is to suggest modern and current Tcl books to your University library for purchase. Most will not only purchase the books, but, will also put them prominently on display in their foyer for the book's first few weeks in the collection.

So you get 'em with "eye-share" at the point of entry for a few weeks, then have crisp and modern-looking textbooks available on the shelf for the browsers later on.


LV There is a directory entry for Tcl and Tk at http://directory.fsf.org/project/tclTk/ - the FSF directory of free software. However, the entry is 3 years old, refers to 8.5 alpha, makes references to the source being maintained on sourceforge, etc. Someone with time to spend advocating Tcl in the public eye might consider tracking down the process of updating that page, updating this note to add that discovery, and then submit an update bringing the information up to date.

MG can't claim to have a lot of time to spend advocating Tcl, but has registered on the FSF site and filed a bug report that the page is out of date, which appears to be the way to get it updated.

Salesmanship

See also the About Tcl/Tk pages on www.tcl.tk http://www.tcl.tk/about/

If you're like most technical people, you're unclear just how management make decisions on what software is used for a project. At times they seem like a black box into which good advice goes and from which bad decisions emerge. The Linux community has put together some good information on how you can sell management on Tcl (of course, they're telling you how to get Linux accepted, but in most cases the ideas and approaches are the same).

Linuxmanship
is salesmanship applied to Linux (and, by extension, to Tcl). This is a great site with some really valuable advice.
The Four Phases of Acceptance
The Four Phases of Acceptable are: Ignorance (where people don't know better and say things like: "Tcl? That's the Expect language, isn't it?"), Denial (where people will come up with excuses to avoid changing: "There aren't enough programmers for us to adopt this" or "Nobody uses Tcl"), Fear Uncertainty & Doubt (where people know better but spread misinformation about Tcl: "Tcl isn't supported and anyway it's slow"), and finally Acceptance (can be on a number of levels: some places don't publicly acknowledge that they use it, while others will gladly proclaim the fact).

Myths

Does it frustrate you to have people saying things about Tcl that you know are untrue, but which are hard to refute on the spot? Here's our cheat sheet for Refuting Common Myths About Tcl:

No Support
Many companies offer technical support. The Tcl Developer Exchange provides a list of some companies [L1 ]. And, of course, there's the huge user community on Usenet.
Only Hackers Use It
Tcl has an impressive list of references--big companies that are using Tcl.
Only Hackers Maintain It
Many of the companies that use Tcl have representatives on comp.lang.tcl, the newsgroup for Tcl developers and maintainers.
Only Suitable For Scripts
There's no difference between scripts and programs in Tcl, and many large programs have been very successfully written in Tcl. For instance, ... is the software that drives most of the ... on the Internet. It is written entirely in Tcl.
I Have To Give Away My Tcl Programs
Programs you write in Tcl are your intellectual property, and you may sell, license, or give them away as you want. Most Tcl programs are distributed in source-code form, but there are source filters and other tools to render your program unreadable by the casual pirate.

On the other hand, be certain that you check the license of any extensions, tools, or distributions that you use during development. Just because Tcl and Tk are free doesn't mean that everything in the community is free.

No Development Environment
There are very nice development environments, such as Tcl Dev Kit (née TclPro) or Komodo. There is also support in many existing editors, such as emacs, vi, and others, which do syntax coloring of Tcl programs. There are also many debuggers from which you are free to choose (See debugging). And you can do revision control on your Tcl code with any revision control system.
Tk widgets don't look good under Windows
yes, Tk widgets look fine under Windows.
Tk widgets look old fashioned under X11
See: http://freshmeat.net/articles/view/928/ and Good Looking Tk.

Resources

See Also

Case Histories

George Peter Staplin: (adds) You should also have firmly in your mind why Tcl is better. Blind faith is like no faith at all.

EKB A little story: I took this advice, but with unknown results! There was a discussion thread [L3 ] on Joel on Software titled "Cross-platform GUI dilemma". The poster described his problem as, "I have a low-level back-end thing that is written in C. I have a command-line shell for it that I wrote as a debugging tool. It's working pretty well and I would like to wrap it in a GUI so I can demo it to nontechnical people. I would like to support Windows, Linux, and Mac if possible." This seemed like a no-brainer, but no one had yet recommended Tcl/Tk and far down the thread there was a post, " geez, this all sounds so complex...wx this and Gtk that and , holy cow...You guys discourage development - I must say, it makes me glad to have my Visual Studio - and now I know why I stick to Windows development lol" Yikes! So I added a post at the end, "You can use Tcl/Tk, then wrap it into a Starkit or with Freewrap for a standalone executable. Tcl/Tk is *great* for wrapping a command-line app in a GUI. Info is available at [...link to Tcler's Wiki...]" After that there was a great, thundering silence, and after a longer time the thread was closed and archived. I got the last word, but I don't know that anyone heard...

See: http://discuss.joelonsoftware.com/default.asp?design.4.108173.51


Ulrich Albrecht One more story, same implication: A couple of years ago I was working at the technical university of Aachen (Germany) on a robot simulation and path-planning system, including fast collision detection. The core functionality was included in a C++ class hierarchy describing robot parts and kinematics, with a lot of C libraries from other sources mixed in. The code was to perform on a real robot controller (a PPC-machine running vxworks), SGI Irix (MIPS), Sun Solaris (SPARC), Linux (Intel) and eventually MS Windows (Intel), so we could not include any platform specific stuff. With the exception of vxworks though - where the real thing was moving - we thought we should have a GUI with a virtualization and visualization of the robot and its environment. Tcl/Tk looked good, because it was the only package that was as portable, flexible and extensible as we needed. I wrote an OpenGL-widget for Tk and a Tcl-to-C++ command-wrapper for every C++ class I needed to construct and control at runtime, and ended up with a robotics-enabled wish I could feed all kinds of szenarios and interact with. I can really say that 1. portability was not a big issue, because the core C/C++-libraries were OS-independent and Tcl/Tk as well as OpenGL were properly ported, 2. performance wasn't either, because the critical parts were nice, dirty compiled C/C++, 3. usability was very good because of the robust interactive Tcl-interpreter we could use for free, 4. the Tk-part performed and looked a lot better and more OS-consistent than anything I've since seen in Java...

We even run this stuff in MS Internet Explorer (using the Tk-Plugin) for demonstration purposes.

Nearly forgot: Porting the code to MS Windows was not the problem - it was the makefiles that nearly drove us mad.


Notice the essay on language selection Kevin Walzer mentions.


http://www.businessweek.com/magazine/content/05_05/b3918001_mz001.htm

Nice article about the success of Linux. It discusses how they have successfully navigated the waters between wild and wooley RMS radicalism, and corporate giants like IBM, and how Linux is on a roll that doesn't look to stop anytime soon. - davidw

HJG Many things can be done in Tcl/Tk much easier than in other languages. I think we need a page for a list / showcase of such programs.


LV: A co-worker, after reading a recent Regular Expressions column by Cameron Laird, had this to say:

Larry,
...on the subject of Tcl being "dead"...
Tcl and Tk are "dead" in the same sense that mitochondria are "dead". They may not be evolutionarily "hot", or competing overtly in the ecosystem, but their disappearance is not something that I lose sleep over.

For those upon whom this comparison is lost, see:

http://www.ruf.rice.edu/~bioslabs/studies/mitochondria/mitorigin.html

...or an earlier take on the Tcl/Tk-mitochondria analogy, and the "symbio-friendliness" of Tcl/Tk:

http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/20866ce0f36a5904/b099dbcea5b9d20d%23b099dbcea5b9d20d

Lars H: I suspect that co-worker would lose sleep if all mitochondria disappeared, since these supply most of a cell's energy (anything that consumes oxygen; when the mitochondria can't keep up, you get lactic acid). I wonder what the computer analogue would be. The Internet crashing because all the routers with embedded Tcl would stop functioning if it suddenly disappeared? Hmm... perhaps the analogue works, after all!

aa: I think you misread the intent of the comment. The idea of Tcl/Tk/mitochondria going away isn't a cause for worry. Not because it would be a benign event if they did, but simply because they're not going to go away.


Think of all the programming languages of the world as a forest. Tcl is a clearing in the middle of the forest where the sun shines, a cool breeze blows, and you can get a breath of fresh air.

You might be lost if you've not been to the clearing before, but it's real easy to find your way around. Just don't expect as many things to be laying on the ground waiting to trip you up.

Oh, and you can make your own trees. -- (Bryan Oakley on comp.lang.tcl, 2007-07-12)