On Jul 12, 2006, at 6:34 AM, Lukas Renggli wrote:
Look for
methods sending 'Object new' in your image. I found a few
dozens in my VASt image.
Yes, I know, but this is not something Object is designed for.
Well, this is Smalltalk. There is no hard and fast definition of
"Abstract class." What if you create an instance of a class that has
methods that send #subclassResponsibility, but never call those
methods? If you have a class with a complete implementation of some
concept, but only happen to create instances of its subclasses, is it
abstract or concrete? How about a class that sends
#subclassResponsibility but answers #isAbstract with true? How many
angels can dance on the head of a pin?
For purposes of SUnit, the meaning of "abstract" is simple. A
TestCase subclass that answers #isAbstract with true will not be
included in automatically built TestSuites. It's that simple. With
that purpose in mind, the existing implementation is fine:
It works nicely for the common case - a single abstract class with
several concrete subclasses
It's simple, so that in the uncommon case of several levels of
abstract classes, the redundant implementations are easy to write and
easy to understand
If an abstract class is renamed, #isAbstract shows up as a reference,
and can be updated easily
Colin