[squeak-dev] Class subclasses

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Thu Jun 12 20:19:30 UTC 2014


2014-06-12 19:56 GMT+02:00 Frank Shearar <frank.shearar at gmail.com>:

> On 12 June 2014 04:44, Florin Mateoc <florin.mateoc at gmail.com> wrote:
> > Hi,
> >
> > I think this is an old bug, presumably since ProtoObject was introduced
> (and presumably because ObjectTracer was used in
> > the process).
> >
> > If you ask Class for its subclasses (or if you inspect it) you see that
> ObjectTracer class is listed along with
> > ProtoObject class, although ObjectTracer's superclass is ProtoObject.
> > This can lead to some funny bugs if you try to write some hierarchy
> traversing code.
>
> ObjectTracer's superclass is ProtoObject, as you say, but ObjectTracer
> class's superclass is indeed Class. (Indeed, ProtoObject class
> superclass == Class.)
>
> So I'm not sure I understand the nature of the problem: metaclasses
> are usually Class subclasses.
>
>
Normally, [B superclass = A ==> (B class superclass = A class)].
This is so that [B class canUnderstand: A class selectors anyOne].

What you have now is that (ObjectTracer class canUnderstand: Object class
selectos anyOne) which it should not.

Of course [ObjectTracer class canUnderstand: Object selectors anyOne] is
true.
It inherits from Object because a Metaclass is an Object...


Aren't those funny bugs to do with the (unavoidable) singularity at
> the top of both hierarchies?
>
> frank
>
> > Cheers,
> > Florin
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140612/e9a30cca/attachment.htm


More information about the Squeak-dev mailing list