Re: What are the relative advantages of Python and Tcl?

Larry Wall (
Mon, 4 Apr 1994 19:35:52 GMT

In article <> (Ty Sarna) writes:
: Ignoring Tk, Tcl has two features that Python and Perl can't compete
: with:
: - Tcl is *incredibly* easy to embed and extend. This after all is
: Tcl's main goal in life. Neither Perl nor Python could be made to
: embed this easily, since they're richer languages and demand a more
: complex interface to their internals.

Perl 5 should be just as easy to embed as TCL. And extension is not
difficult, especially if you restrict yourself to the same datatypes
that TCL restricts you to. :-)

: - you can invent new syntax in Tcl. While Python gives you a clean
: consistent syntax everywhere, and Perl gives you a succinct but
: confusing syntax everywhere, you can user Tcl's clean syntax most
: places and invent new succinct syntax for things that need it.
: Eg, you could invent a kind of procedure definition for compiled
: "rules" of regexps, and then call these functions as you would
: any other function. None of this requires changing Tcl itself.

I'm not sure I'd call this inventing new syntax, so much as making it
very easy for arguments that look like TCL code to be interpreted as TCL
code. But I'm not really familiar enough with TCL to judge here.

: (This is not an attack on Python, but rather a defense of Tcl. If
: anyone wants to attack Python or Perl, I'll happily defend them as well.
: I've used all three, and for different types of applications each
: excels.)

Certainly, though it's unclear whether this is viewed by the respective
authors as three separate ecological niches or as merely imperfect
occupation of a single ecological niche. There certainly does seem to be
a tendency for these languages to converge, or at least to steal--er, uh,
I mean, borrow ideas from each other.

But hey, I voted for comp.lang.python...

Larry Wall