Version 127 of Tcl Advocacy

Updated 2012-02-25 18:20:16 by AMG

The purpose of this page is to discuss and help spread the use of Tcl in places where it is appropriate. It's also fine to condemn Tcl when it is being used inappropriately (thus giving Tcl a bad stench and ultimately hurting itself by hindering its further spread). It's also fine to compare and contrast Tcl with other languages IF there is some benefit to doing so. For example, benchmarks are useful not simply to show where Tcl is better but also to show where Tcl can be improved.

See also the PosiTcl page -- JC. Some emotional points for Tcl are at Is Tcl Different! -- RS

For starters, I copied the Perl Advocacy page [L1 ]. It's a lot more propaganda-like than I was looking for, but hey, it's a start. I started off by doing a search/replace with Perl/Tcl and the result isn't bad. Of course, I did have to delete things like "Myths: Perl is Unmaintainable" and "Myths: Only Hackers Use It" since these are not generally regarded as serious concerns in the Tcl community. Otherwise, the rest of it applies.

Strengths

Don't just defend Tcl, promote it!

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 06/08/2006 -- 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.

What about information on features such as: Trivially embedded, and Deployment via starkit/starpack?

And what about Binary data handling? Easy extensible with C/Fortran? -- Sarnold 20060325

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. -- Caj

Success Stories

Here are some big companies that have used Tcl successfully:

To come . . . .

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

Salesmanship

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

Tcl Articles may have a pointer to a language feature or successful project similar to those for which you are advocating Tcl.

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 [L2 ]. 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 What debugging tools are available to a Tcl programmer). 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.

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, In July, 2004, this computerworld article [L3 ] discusses the top 5 objections to open-source and the ways to address those objections..


Notice the essay on language selection Kevin Walzer mentions.


2005/01/20 pidors I just saw "10 Things I Hate About Tcl" [L4 ] 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.


RLH The best advocacy is to TELL people about it. If you aren't doing Tcl "evangelism", you should be!

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 [L5 ] 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.


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.


Tcl Articles contains links to quite a few articles that can arguably be classed as advocating Tcl.


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)


Article on dynamic languages and the web - http://www.infoworld.com/article/08/10/13/42TC-dynamic-futures_1.html?source=NLC-DAILY&cgd=2008-10-13 - which talks about JavaScript, Perl, PHP, Python, Ruby, Groovy, but no mention of Tcl.


This blog writer [L6 ] discusses an experience of using Tcl and really appreciating it.