[squeak-dev] Re: Object>>#is:? (was: Re: PackageDependencyTest)
siguctua at gmail.com
Thu Mar 4 21:57:13 UTC 2010
2010/3/4 Stéphane Rollandin <lecteur at zogotounga.net>:
>> Then, please , give me a concrete example, where you will have 3 classes,
>> answering to isXXX message differently:
>> base (false) -> parent(true) -> subclass(false).
> I have this mostly in class-side methods; an example in Squeak proper (that
> is, not my code), is TestCase class>>isAbstract
I think this is a bad example.
#isAbstract used for different purpose, not what we're discussing
here, i.e. it doesn't tells what kind of protocol an object may
support, but rather used to test the state of object (in this case
object is a class being abstract or not).
In same way, as using #isClosed, or #isOpen to test whether file is
open or closed.
And besides, a base implementation (TestCase isAbstract) answering true.
Igor Stasenko AKA sig.
More information about the Squeak-dev