scsh-users
[Top] [All Lists]

Re: Ousterhout and Tcl lost the plot with latest paper

To: scsh@martigny.ai.mit.edu
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
From: Mark Chu-Carroll <mcc@phouka.watson.ibm.com>
Date: 07 Apr 1997 14:27:56 -0400
Organization: IBM T.J. Watson Research Center
fellowsd@cs.man.ac.uk (Donal K. Fellows) writes:

> In article <E88Ir4.EK4@undergrad.math.uwaterloo.ca>,
> Paul Prescod <papresco@csclub.uwaterloo.ca> wrote:
> [ JO's simple button example elided ]
> > Easier to use for people who are not knowledgable about the language? Yes.
> > Easier to use for people who are? No. The latter is certainly no harder
> > for a MCL programmer than the former is for a TCL programmer. It will also
> > be easier to maintain, for all of the usual reasons.
> 
> OK, let's raise the stakes a little.  :^)
> 
>   toplevel .t
>   button .t.b -text Hi! -font {Times 16} -command {puts "Pressed at (%x,%y)"}
>   pack .t.b -fill both -expand 1
> 
> The button now appears in a separate window to the main application
> window, and reports where it was pressed.  When this window is
> resized, the button will occupy any extra space allocated.  How much
> extra Lisp would be needed to achieve this?
> 
> Unless you can do this in very few lines, the point about Tcl being
> better for some things would seem to be made amply to me.

It's been a while since I've used STK, so I'll use a pseudo-syntax. This
is very close to how it would appear in STk using STklos:


(define top (make <Toplevel> :fill 'both :expand t))
(define but (make <button> 
                  :font "Times 16"
                  :in top :fill 'both :expand t
                  :command (lambda (x y)
                            (display "Pressed at (" x "," y ")"))))
(pack but top)

There you go. Big deal.

At this level, we're discussing trivialities. Sure, TK is cool. But
*lots* of languages can be used to define TK bindings, and many of
them are as simple and succinct at TCL. We can play games with
comparing the number of lines of TCL/TK compared to other TK bindings
all day, and we won't learn anything interesting.

The question is, is Ousterhout's claim that TCL is a good glue
language for significant applications correct? These little 5 line
pissing contests do nothing to address that claim. 

Personally, I believe, from my own experience, that TCL is *not* a
good glue language. I've been working, on and off, on a text
editor. The earliest was written in TCL. For that, TCL was really a
nightmare - the lack of real data structures was extremely painful;
the lack of encapsulation was extremely painful. It's my belief that
lacking any support for these two was a crucial mistake in the design
of TCL. The lack of support for data structures is particularly
damning when you realize how trivial it would have been to add some
kind of structure support like Lisps cons-cells.

        <MC>

-- 
Mark Craig Chu-Carroll          || "I'm not dumb, 
IBM T.J. Watson Research Center || I just have a command of thoroughly useless
mcc@watson.ibm.com              || information." --- Calvin

<Prev in Thread] Current Thread [Next in Thread>