[squeak-dev] Re: why OOP needs tails recursion article

Juan Vuletich juan at jvuletich.org
Sat Dec 5 22:33:54 UTC 2009

Eliot Miranda wrote:
> On Sat, Dec 5, 2009 at 2:00 AM, Stéphane Ducasse 
> <stephane.ducasse at inria.fr <mailto:stephane.ducasse at inria.fr>> wrote:
>     http://lambda-the-ultimate.org/node/3702
> I want to return to the implementation and optimization implications 
> of this later.  But Steele's post refers to William Cook's excellent 
> paper On understanding data abstraction, revisited. Onward! Essays, 
> 2009 ACM OOPSLA. SIGPLAN Notices 44, 10 (Oct. 2009), 557-572. There's 
> a freely available draft version 
> <http://www.cs.utexas.edu/%7Ewcook/Drafts/2009/essay.pdf>.  The quote 
> I want to emphasise is
> The extensibility of objects does not depend upon inheritance, but 
> rather is an inherent property of object interfaces.
> The paper proves this point eloquently and concisely.  The implication 
> is that isKindOf: is <shout>*/BROKEN</shout>/*.  In the absence of 
> something better isSomeInterface to query whether an object implements 
> some interface SomeInterface is acceptable.  isKindOf: (and the horror 
> I found the other day isKindOf:orKindOf: (you see why it exists and 
> where it leads?)) is not and should be expunged.
> My weekend rant.
> best,
> Eliot
I fully agree with #isKindOf: and the reasons given in the paper.

But in my opinion, the #is: method as suggested by Igor at 
(and included in Cuis) is much better than #isSomeInterface. It has two 
big advantages:
- It does not bloat the classes, especially Object, that would need to 
implement many #isSomeInterface variants.
- By just looking at the inheritance of a certain #is: implementor you 
can get a quick grasp of the interfaces it conforms.

Juan Vuletich

More information about the Squeak-dev mailing list