Newsgroups: comp.lang.scheme,comp.lang.tcl,comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!udel!gatech!howland.reston.ans.net!pipex!uunet!world!gjc
From: gjc@world.std.com (George J Carrette)
Subject: TCL is fat,slow,and lacks staying power.
Message-ID: <CzFnvK.4n9@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 17 Nov 1994 22:30:55 GMT
Lines: 76
Xref: glinda.oz.cs.cmu.edu comp.lang.scheme:11350 comp.lang.tcl:21961 comp.lang.lisp:15681

Please, can we lay to rest the myth that TCL is small and lisp
interpreters are big? The TCL source code is at least 5 TIMES BIGGER,
and the stripped binary is at least TWICE AS BIG as a classic
scheme interpreter like SIOD.

This posting is prompted by a knee-jerk response I got recently
on a mailing list when I suggested using SIOD as a way to
script some arbitrary filenaming-munging into a very nice 
Microsoft-Windows-for-Work-Groups compatible file server
for Unix called Samba.

The questions were so wonderfully typical of TCL bigotry that I
figured others may enjoy feasting on them too. 

Somebody said:
>Had you considered TCL ?

Yes. My suggestion to use SIOD was after serious consideration
of the trade-offs involved.

>I believe it may be smaller than the one you mentioned.

Why would you want to say you believe something like that?
1. Distribution sizes: (ftp.std.com ...someplace...)
-rw-r--r--    1 bzs      staff    1822720 Nov 23  1993 tcl7.3.tar
-rw-r-xr-x    1 gjc      gjc       211603 Apr 28  1994 siod-3.0-shar
2. Stripped binary built on SGI IRIX MIPS:
-rwx------    1 gjc      sys       199552 Nov 17 16:15 tclsh
-rwx------    1 gjc      sys        95792 Nov 17 16:15 siod
3. Source code, using wc on *.c and *.h files:
[TCL]
 tcl library source        26738    100447    734901 total
 required "compat" source   1929      8576     56127 total
[SIOD]
 source including SQL support for both Oracle and RDB commercial databases
 and macintosh support      4981     12903    136440 total

And to consider the case in question, which was to add script-driven
dynamic file-hook to the LANMAN server samba-1.8.05, the wc *.c *.h
for the files that go into smbd: 
                           20912     60293    568786 total

So you think TCL is small, yet it is bigger than the thing
you want to add it to? The source to TCL is some 30% bigger. 
Does that make sense? 

When somebody asks for a small interpreter to add to something, if I
suggest SIOD it is because SIOD *is-in-fact* small.

Lots of people beleive that TCL is small because certain things
about TCL have been *justified* by claiming "... did it that way to
keep it small." But that doesn't make it small.

Of course, as Prof. Fano told me on a bad-weather day last winter at
the local Stop and Shop, "interpreters are always small, it is the
subrs you need that make things large." (Historical note, Fano was the
head of the MIT Laboratory for Computer Science many years ago. Or was
it Project Mac?)

>it has a generic 'embeddable' interpreter in the PD.

Lots of lisp interpreters, including SIOD are distributed that way too.

>In addition, there is a version which is supposed to be 'safe' for server's
>to run client submitted code ;-)

Well, all I can say about that is that if you want to use the 
theory of programming languages to *prove* that something is safe
you are a heck of a lot better off with a language that has been
extensively studied in the computer science literature, such as Scheme.

The only thing worse than a known unsafe methodology is an unproven "safe" one.

But seriously, safety in practice comes down to some fairly simple
ideas, like syntax checking and name hiding.

