this is why there is a or in my expression and this is why I still would like to have a way to declare a class as abstract even if it
does not have abstract methods.

stef

On Oct 5, 2008, at 11:34 PM, Alexandre Bergel wrote:

A class is said to be abstract if its not reasonable to instantiate it. An abstract class may perfectly have no abstract method.

Cheers,
Alexandre


On 5 Oct 2008, at 11:49, Stéphane Ducasse wrote:

I would really like to have a way to specify that a class is abstract.
For example I would like to be able to write a test as follow

        self assert: (Collection allSubclasses reject: [:each
                                each isAbstract ]) new isEmpty

now saying that isAbstract is if a class has one method sending subclassResponsibility is not
really good for me.


May be we could have something like

        isAbstract

                ^ self declaredAsAbstract
or: [ (self whichSelectorsReferToSymbol: #subclassResponsibility) isEmpty not]
                


Stef

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


--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






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



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

Reply via email to