scsh-users
[Top] [All Lists]

Re: Ousterhout and Tcl lost the plot with latest paper

To: black@zen.cypher.net
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
From: Chris Bitmead <Chris.Bitmead@alcatel.com.au>
Date: Thu, 03 Apr 1997 15:24:54 +1000
Cc: scsh@martigny.ai.mit.edu
Reply-to: Chris.Bitmead@alcatel.com.au
>> 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.
>> 
>
>i assume you mean different objects of the same class respond to the same 
>message the same way (by executing the same method).  if you mean that 
>objects of different calsses respond the same way to the same message, 
>you need to look up polymorphism in the context of OOP.

I mean that different classes respond to the same message in a
different albeit appropriate fashion.

>> 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.
>> 
>
>that isn't inheritance, it's reuse.

Implementation inheritance is just a formalised discipline for code
re-use. Take a look at a language which separates the concepts of
interface and implementation inheritance.

>> 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.
>
>or you could just start with a language that does it right from the start.

Stk Scheme is a language which _has_ "done it right" from the start.

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