> Lukas, do you think the second statement in this method could be removed, it > would take a lot less time to know if a class is abstract. > > RBAbstractClass>>isAbstract > (self whichSelectorsReferToSymbol: #subclassResponsibility) isEmpty > ifFalse: [^true]. > model allReferencesToClass: self do: [:each | ^false]. > ^true > > I know it would change the definition of what is an abstract class for RB, > but i'm just wondering if this is ok: > > "A Class is abstract if it defines a subclassResponsibility method and no > other classes reference it" > > The second clause in my opinion could be avoided.
Just recently I looked at that definition too. It is a bit strange. Also given that it only looks for #subclassResponsibility in the class itself and not in the superclasses. Unfortunately changing anything breaks some tests. As discussed previously there is not a single definition of an abstract class, so maybe it is best if you add your own domain-specific implementation of #isAbstract. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
