[squeak-dev] Re: Object>>#is:? (was: Re: PackageDependencyTest)

Stéphane Rollandin lecteur at zogotounga.net
Thu Mar 4 22:05:34 UTC 2010


>> suppose I need test selectors like isMorph, isBorderedMorph, isMyMorph
>> and isMySpecializedMorph
>
> Here is what you'd do:
>
> .
> .
> .
> .
> .
> .
>
> Nothing. All that you're describing is already there. To wit:
>
> 	Morph new is: #Morph =>  true.
> 	BorderedMorph new is: #Morph =>  true.
> 	BorderedMorph new is: #BorderedMorph =>  true.
> 	Array new is: #Morph =>  false

oh, that's because you start from your #isKindOf; based implementation. 
ok, then, point taken.

>
> We need to find a middle ground here and the #is: protocol helps with that.
>

sure. just maybe call it #isA: like suggested elsewhere, so that its 
intent gets clearer (IMHO of course)

cheers,

Stef





More information about the Squeak-dev mailing list