From: Chris Bitmead
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Date: 
Message-ID: <s6yybb1klbt.fsf@aalh02.alcatel.com.au>
Jon Leech <···@cs.unc.edu> wrote:

>In article <··················@aalh02.alcatel.com.au> you write:
>>output to do calculations. "Which directory entries are older than
>>12/Feb/1997?"  VERY difficult to do with Unix shell. Trivial in a scsh
>>or CLOS style language. One can imagine writing something like (map
>>(lambda (d) (< (file-time d) "12/Feb/1997")) (ls))
>
>    One-liner with the shell, either assuming the existence of a file-time
>comparison program like the file-time predicate you assume, or just using
>'find'.

Ok, someone just pointed out that you can do this in the shell with
the following code....

touch -t 9702120000 /tmp/.zoot$$ 
find . -maxdepth 1 -a \! -newer /tmp/.zoot$$ -print
rm /tmp/.zoot$$

Like I said. Difficult!!

And even assuming you can remember the date layout of the touch
command, the obscure syntax of the find command and remember to remove
the temporary file, how can you store the result in a variable?? You
can stored all the resulting entries in one big shell variable perhaps
for later processing, but then you are subject to the vagaries of
IFS. Point proved as far as I'm concerned.

>>NOW LOOK AT TK!!!! It's object oriented!!!!!!! It's based on all the
>>principles that Ousterhout is deriding. I must say this makes him look
>>like a fool.
>
>    Um, Tk has no inheritance mechanism.

Tk has no properly designed inheritance mechanism. But it does all the
same things, albeit in a horrible disorganised way.

My criteria for object oriented was that (1) different objects react
to the same message in the same way. Clearly different Tk widgets do
this. And (2), Different classes can share common code.

Admittedly Tk does poorly here, but it does have re-use, mostly
because common stuff is split off into utility functions. No, Tk
doesn't support _further_ inheritance without re-organising the code,
but the re-use is there through splitting off common stuff.

So Tk is a good example of how not to do OO. How much cleaner it would
be if it did OO properly.

Now look at Stk. They have put a layer on top making Tk appear to
fully support inheritance, and you can inherit and make
specialisations of widgets and everything. Infinitely more powerful
than Tcl/Tk can ever be.