Peter wrote regarding 'Re: [EE] Simple GUI wrapper for command line applications' on Sat, Nov 12 at 11:53: > > On Fri, 11 Nov 2005, Danny Sauer wrote: > > >Honestly, I think people are suggesting using a language other than > >TCL because other languages are actually useful. :) Useful, in this > >case, is defined by the number of job postings requesting knowledge of > >a language. Search for jobs asking about perl - you'll find more than > > tcl was designed for a particular purpose and it does that very well. It > is a scripting language and it does not try to be the > microscope-that-can-bash-all-the-nails which is what Perl, Python, and > Php try to be. Actually, PHP is a language designed to ease web processing which has only recently "grafted on" some of the neccesary features for CLI scripting. I find PHP somewhat appealing for some small scripts for a few reasons, most of which are syntactic sugar which doesn't really provide amazing features, but makes certain things simple. The wordwrap() method comes in handy, for example. > Instead it is a small, solid *scripting* language that > sticks to *scripting*, as opposed to taking over the universe, and it > also makes it extraordinarily easy to call or invoke other programs, > such that *they* can be used to do whatever it is that they do best. If you want a simple scripting language that just glues things together, though, I'd think that a shell (I'm partial to Bash and the bourne-style shells) might be more appropriate. :) Bash has both traditional and associative arrays, looping/conditional structures, good filehandle support, and support for simple network sockets. String manipulation can be cumbersome in some instances, but it's surprising how much one can really do in Bash if one wants to do so. > tcl is very much like Basic. There is enough rope in it to hang yourself > with but if you are disciplined you will be safe & happy. Typical code > size for tcl vs. python is 1/2. For a really good objective comparison of languages, I'd suggest checking out http://shootout.alioth.debian.org/. There are a few unimplemented TCL entries, maybe you could submit some of them? I've been going through optimizing (within the spirit of the comparison) and contributing in the perl and php sections, for what it's worth. They compare primarily CPU time, memory use, and lines of code for implementations of several different algorithms. Specifically comparing Python to TCL, it looks like the lines of code are usually in the 3/4 to 1/2 range in favor of TCL - but TCL's also 2-3x slower in most, too. :) --Danny -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist