why did these companies choose Tcl over Python
roy at panix.com
Wed Oct 31 15:23:55 CET 2007
chewie54 <dfabrizio51 at gmail.com> wrote:
> I would prefer to use Python but can't deny how popular Tcl is, as
> mentioned above, so my question is why wasn't Python selected by
> these companies as the choice of scripting languages for their
> Are there any obvious advantages like:
> memory footprint,
> better cross-platform support,
> ease of use,
I used to work on a project which was written mostly in Tcl. Not a huge
project, but not a trivial one either. Perhaps a few 10's of KLOC over 100
Tcl source files. The domain was network monitoring using SNMP. No
graphics. We also used a commercially available network simulator (Mimic)
which was written in Tcl (or, at least, has Mimic as its scripting
For us, the biggest thing was the quick learning curve (i.e. ease of use).
Most of the programmers on the team were network jocks, not programmers.
Getting them up to speed on enough Tcl to do their jobs was very quick.
Performance was not an issue, since the application was rate limited by the
network (i.e. waiting for SNMP replies to come back).
We also had lots of hooks into C code. Doing that is trivial in Tcl. Yes,
I know you can extend/embed Python, but it's a LOT easier in Tcl.
Embedding a Tcl interpreter in a C program is literally one line of code.
I sat down with the book to figure out how to do it, and had a running
interpreter going in 10 minutes. Part of what makes it so easy is that
everything in Tcl is a string (no need to support multiple data types).
I don't think I would want to write a huge system in Tcl. For one thing,
it's not object oriented (I have no direct experience with incr Tcl, so
that may not be a fair critisism). It's also slow (even slower than
Python). Of course, in both Tcl and Python, the key to a fast application
is to do all the CPU-intensive parts in C and just script the glue code.
Anyway, I like Tcl. It's certainly worth considering seriously as a
scripting language. As for "which is better, Tcl or Python", there's no
one right answer to that. Evaluate both and decide which fits your needs
better. Often, questions like that will be decided by things which have
little to do with language technology. Is your company re-organizing and
there's a development group who are used to working in language X who are
looking for a new project? Guess which language they're going to pick?
Got a major customer (or prospect) who expresses an interest in language X
for scripting extensions? Guess which language you're going to use?
More information about the Python-list