Forum OpenACS Q&A: What's the rationale for using Tcl?

I am curious, as everything to do with ACS seems to be so well
thought out and justified, what features of Tcl made led to it's
being used in ACS? Was it just conveniently embedded into AOLserver
or is there more to it?
Collapse
Posted by Ben Adida on
Ah, yes, that question. We should answer it once on this bboard,
and maybe we'll never have to answer it again :) (yeah right).

In 1995, which is when the ACS really began, the world ran web
sites with CGI scripts. The really adventurous people were
writing NSAPI C code (fun fun fun). A small company, Navisoft,
had figured out a way to write an efficient, threaded web server
named Naviserver with a thread-safe version of Tcl. That's the
real reason why Tcl was used at all on the ACS. At first, you hate
Tcl, and then you learn to live with it.

Now, Tcl isn't all that horrible for web development. For one, it
handles strings really well, which is great for HTML and SQL
handling. Also, it is a very high-level scripting language, which
allows one to do simple things in a few lines of code. As long as
you leave the complex pieces to a bunch of underlying C
modules which you link together with "Tcl glue," you should be
fine. Finally, it was made truly thread-safe by the awesome
AOLserver engineering team. Many competing languages
cannot make the same claim.

In general, a language is useful for web development if it is
relatively efficient, if it is well integrated into the server
environment, and if it has access to plenty of library code to
speed development of real systems. The one thing that Tcl lacks
a bit of is the library code (although ACS is pretty good already).
To help on that level, Dan (of OpenACS Intranet & webmail fame)
is working on ns_java, an AOLserver module that allows Tcl
code to directly interface with a Java VM. Now *that* is going to
kick some serious butt.