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.


Maybe it would be better to separate this method into:


RBAbstractClass>>isAbstract
        ^ (self whichSelectorsReferToSymbol: #subclassResponsibility) notEmpty 

RBAbstractClass>>isUnreferenced
        model allReferencesToClass: self do: [:each | ^false].
        ^true



Thanks,
Fernando
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to