[SS] 25Jan2005: It's well known that many Lisp dialects, like Scheme, have features that Tcl does not have. For example first class continuations, automatic tail calls optimization, more speed. This page is instead my personal opinion about what in Tcl is better than in Lisp. I used Scheme to write Web applications for some time before to switch to Tcl, mostly for the reasons below. Note that I like Lisp a lot, I'm a great fan of it. One reason why I like Tcl is that I find it similar to Lisp in some aspect, similar to what I enjoyed of Lisp, I mean. This is my list of things I like more in Tcl over Lisp: * Tcl is a programmable programming language like Lisp, in both you can write new control structures, and more generally it's possible to specialize both the languages. But while in Lisp is usually needed to write macros, in Tcl you have to write normal procedures. * Lisp has types, more or less like Python and Ruby. For example in order to use a number as argument of a string manipulation function, there is to convert from one type to the other. * In Tcl serialization just happens for many types because almost everything has a string representation. You can write a Tcl list in a file just with: puts $fd $list. This is not possible in Lisp, where you need to perform serialization. * Lisp central data type is the list, while Tcl central data type is the string. Tcl also makes a lot of use of lists that are just special strings. In today's world, to have strings as base type is usually more useful, because many thinks like HTML, XML, Networking Protocols, are about strings more than they are about lists. To deal with strings in Lisp is not as natural as with Tcl. On the other side, Tcl lists features allow to exploit many programming paradigms used in Lisp. For example to convert a string into a list of characters, and manipulate it as a list when is more convenient. * The Tcl world is less fragmented. There aren't a big number of implementations of Tcl, and there is a bigger default library. * Tcl has built-in event-driven programming, integrated with the I/O library. To write complex networking programs with just what is provided in the core language is so simple it's funny. Please feel free to comment, expecially if you think some of the points are not fair. --The #scheme room on irc.freenode.com responds thusly; comments please http://wiki.tcl.tk/13410 There are still people that use Tcl? Ok, got it. slack_tcl: Argument 1, Macros: Tcl represents everything as strings (formally). That makes optimization horrible, and requires a runtime interpreter. Argument 2, auto-type-conversion: Nice for small stuff, leads to annoying bugs in bigger programs. Argument 3, serialization: Use WRITE to serialize data structures. Argument 4, Strings: A list is a compound data type, a string is not compound, but needs a parser to be so; the basi c data type of a language should be a compound type; Scheme has wonderful support for HTML/XML, because HTML/XML is not about strings, but about structure, which Scheme can represent very well. Argument 5, less fragmentation: True (whether that's a pro or con is subjective). Argument 6, event-driven programming: True; Tcl has a better standard library than R5RS; most scheme implementations have a good one as well, and using cont inuations, event-driven programming can be abstracted away, which is even better than a basic foundation, which also can be implemented easily in Scheme. ;-) ``Years ago at an X conference in San Jose, Ousterhout gave a talk on Tcl/Tk. I came away from the talk thinking "Man, what a poorly implemented Lisp interpreter that is!" (Mike McDonald)'' ---- [Category Language]