RE: TCL VS. PERL _________________________________________________________________ From claird@Starbase.NeoSoft.COM (Cameron Laird) Organization NeoSoft, Inc. +1 713 968 5800 Date 12 Jun 1996 08:59:35 -0500 Newsgroups comp.lang.perl.misc,comp.lang.tcl,comp.lang.perl.tk Message-ID <4pmig7$262@Starbase.NeoSoft.COM> References 1 2 _________________________________________________________________ In article <4pkam5$9hn@csnews.cs.colorado.edu>, Tom Christiansen wrote: > [courtesy cc of this posting sent to cited author via email] > >In comp.lang.perl.misc, > jnielsen@magnus.acs.ohio-state.edu (John F Nielsen) writes: >:Because the webserver I am now using uses embedded tcl, I have started to >:learn it. Typically, I program w/perl 5. Perhaps I haven't played enough . . . >You can have embedded perl as well, you know. The Apache server >has it, as does O'Reilly's. > >:(As a side note, w/regards to speed, with the perl5 database package I wrote, >:it's more than 10 times slower than using embdeed tcl. So, for serious >:database work, tcl has an advantage). > >That's pretty crazy. Typically perl is about 5x to 50x faster than tcl, Tom, I think the point is that Mr. Nielsen is comparing a Tcl embedding with forked Perl processes. He seems to understand this isn't "fair", but wasn't aware of the technology for embedding Perl. . ['bit of overkill on performance is- sues] . . >:Can anything think of a case, where a problem is solved much eaiser using tcl >:than perl. What advantages does tcl have over perl as a scripting language? > >Tcl has the advantage that as a minimalist metalanguage, it allows you to >make new languages by its very redefining syntax on the fly. For good and >for bad and maybe even for evil, this is because tcl is really little more >than csh + lisp + cpp. Tcl shines brightest when you're using it for its >intended purpose as a glue language, much like the shell, but often bombs >when you try to do full applications programming in it. One of tcl's cute Right. Mr. Nielsen, please understand that there are small European principalities devoted to de- bating "Tcl vs. Perl" as a tourist attraction. Well, that's perhaps an exaggeration, but cer- tainly it's a topic that has been done before . Explanation of the highlights has been refined to the point that Tom can probably write this stuff in his sleep. The nice thing is that he writes accurately. I'll express some of the same points just a bit differently: use Tcl if 1. you think of yourself binding the "scripting" (and Tom is utterly correct when he quotes that word) part of your application closely with C codings; 2. you like the LISP attitude of writing a domain-specific language for every application (but then, why not use scsh? That's a differ- ent question); 3. through historical accident you're more comfortable with Tcl; and/or 4. Tcl happens to have extensions that fit your problem better than the corresponding ones for Perl (example: there's no engineering reason not to build a great SNMP application with Perl, but Scotty already exists. Peter da Silva emphasizes that Tcl promotes the program-data duality. In fact, it's also straightforward to write Perl applications that act on Perl scripts, but I agree that Tcl has at least an attitudinal edge. That's about it. For everything else that comes to my mind, Perl is about the same as Tcl, or superior. Myself, I mostly use Tcl this year. . . . -- Cameron Laird http://starbase.neosoft.com/~claird/home.html claird@NeoSoft.com +1 713 623 8000 #227 +1 713 996 8546 FAX