[BUG]?? Problem sending allSubclasses to Object

Carl Gundel morphic at hotmail.com
Fri Apr 9 18:16:16 UTC 1999


Aha!  I didn't notice that Object>>allSubclasses returns both classes 
AND metaclasses.  It does this in VisualWorks and Squeak.  
VisualSmalltalk on the other hand, does behave as I thought (returns 
like kind, either class or metaclass).  Of course I realize that 
MetaClasses are subclassed from Object.  Personally I prefer the 
VisualSmalltalk behavior because it lets me easily get classes and 
metaclasses independently, or both.

I wonder if the ANSI standard defines behavior for this.

Thanks John.  :-)

-Carl

>At 10:08 AM 4/9/99 -0700, Carl Gundel wrote:
>>In my own experiencem, I expect that...
>>
>>aClass allSubclasses           "returns classes"
>>
>>and
>>
>>aClass class allSubclasses     "returns metaclasses"
>>
>>I've noticed that the following returns a Set of metaclasses:
>>
>>Object allSubclasses
>>
>>Subclasses of Object return classes.  Is this a bug?  VisualWorks 
and 
>>VisualSmalltalk both return classes for Object>>allSubclasses.
>
>Actually, VisualWorks also returns metaclasses:
>	Object allSubclasses includes: Object class ==> true
>I think VSE's implementation is the "buggy" one, since it is not 
returning
>all subclasses of Object:
>	Object class withAllSuperclasses includes: Object ==> true
>
>
>John Brant
>


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com





More information about the Squeak-dev mailing list