From: Marc Battyani
Subject: finalize-inheritance (Meta Object Protocol)
Date: 
Message-ID: <46549E379FA02929.652439DF0460745C.B5A376628A3D79A0@library-proxy.airnews.net>
Hi,

From the "The art of MOP" clos:finalize-inheritance seems not
 to be called on the superclasses of a class when this class
is finalized.

Is this true?

Can I force the superclasses to be finalized before finalizing my class?

Something like a :before method on clos:finalize-inheritance.

BTW are there any other documentation on MOP than "The art of MOP" ?

Marc Battyani

From: Paolo Amoroso
Subject: Re: finalize-inheritance (Meta Object Protocol)
Date: 
Message-ID: <36e883c8.3956853@news.mclink.it>
On Sat, 6 Mar 1999 22:34:40 +0100, "Marc Battyani" <·············@csi.com>
wrote:

> BTW are there any other documentation on MOP than "The art of MOP" ?

You may check:

"Open Implementations and Metaobject Protocols"
Gregor Kiczales, Andreas Paepcke
(Xerox PARC - Open Implementation Group)
http://www.parc.xerox.com/spl/groups/eca/pubs/papers/Kiczales-TUT95/for-web.pdf


Paolo
-- 
Paolo Amoroso <·······@mclink.it>
From: Howard R. Stearns
Subject: Re: finalize-inheritance (Meta Object Protocol)
Date: 
Message-ID: <36E42154.A9F77B6A@elwood.com>
Marc Battyani wrote:
> 
> Hi,
> 
> From the "The art of MOP" clos:finalize-inheritance seems not
>  to be called on the superclasses of a class when this class
> is finalized.
> 
> Is this true?

I don't think there is any need for it superclasses to be finalized, if
you do have some specific need then...

> 
> Can I force the superclasses to be finalized before finalizing my class?
> 
> Something like a :before method on clos:finalize-inheritance.

.... yes, that sound's like the thing to do.  However, the CLOS MOP spec
does note that you shouldn't define methods that are specialized on
system classes -- only on specializations of them that you define. 
Thus, you really need to define your own class metaclass, with your own
set of methods on it.  Although this may sound painful, I'm not sure
that its out of line.  Again, it all boils down to why you think you
need to have the superlcasses finalized.

> 
> BTW are there any other documentation on MOP than "The art of MOP" ?

See http://www.elwood.com/alu/table/references.htm#mop

> 
> Marc Battyani
From: Marc Battyani
Subject: Re: finalize-inheritance (Meta Object Protocol)
Date: 
Message-ID: <33307802A64EE7F1.4DE63D2A347880F0.11382C7E18DADDE9@library-proxy.airnews.net>
Howard R. Stearns <······@elwood.com> wrote in message
······················@elwood.com...
...
>I don't think there is any need for it superclasses to be finalized, if
>you do have some specific need then...

It's the case in fact I added rules in my classes and I need to
compile the rules of the superclass before those of the given class.

>> Something like a :before method on clos:finalize-inheritance.
>
>.... yes, that sound's like the thing to do.  However, the CLOS MOP spec
>does note that you shouldn't define methods that are specialized on
>system classes -- only on specializations of them that you define.
>Thus, you really need to define your own class metaclass, with your own
>set of methods on it.  Although this may sound painful, I'm not sure
>that its out of line.  Again, it all boils down to why you think you
>need to have the superlcasses finalized.

Should be ok then, I already have a derived metaclass.

 >>>
>See http://www.elwood.com/alu/table/references.htm#mop

I will look at it, thanks.

Marc Battyani
From: Marc Battyani
Subject: Re: finalize-inheritance (Meta Object Protocol)
Date: 
Message-ID: <5070A06E7FCDB24B.C3C2080FE9E95BF2.987FF7C714BE6EBB@library-proxy.airnews.net>
Howard R. Stearns <······@elwood.com> wrote in message
······················@elwood.com...
>See http://www.elwood.com/alu/table/references.htm#mop

I looked at it: MOP in hyperspec format...Great!
I have "the Art of MOP" book but it's much more usable in that form.

Marc Battyani
From: Steven M. Haflich
Subject: Re: finalize-inheritance (Meta Object Protocol)
Date: 
Message-ID: <36E42675.96602A0B@franz.com>
> From the "The art of MOP" clos:finalize-inheritance seems not
>  to be called on the superclasses of a class when this class
> is finalized.
> 
> Is this true?
> 
> Can I force the superclasses to be finalized before finalizing my class?
> 
> Something like a :before method on clos:finalize-inheritance.

The real question is why you want to finalize superclasses at all.
Finalization of superclasses is not necessary for a class to be
instantiated.  Finalization only does things necessary for direct
instances of the class to exist, e.g. performing the slot-layout
protocol.  Usually programmers need not worry about finalization,
since it happens automatically the first time an instance is
created.

If you really want to do this, you can of course cause it to happen
by adding methods.  However, the MOP prohibits addiong methods to
gfs specified in the standard where all specializers are classes
also specified in the standard.  In other words, at least one of
specializers must be some subclass, so you can only do this for
some metaclass you write, not for standard-class directly.

You should also be careful in that some superclasses (e.g.
standard-object) might not be finalizable in some particular
implementation.  Finalization of a large tree of superclasses
is expensive, and computes lots space-consuming metaobjects that
are otherwise useless if the class will not be instantiated.
From: Marc Battyani
Subject: Re: finalize-inheritance (Meta Object Protocol)
Date: 
Message-ID: <FA1C862573CBAFD9.7A2976512B5095AF.078617568089A376@library-proxy.airnews.net>
Steven M. Haflich <···@franz.com> wrote in message
······················@franz.com...
...
>The real question is why you want to finalize superclasses at all.
>Finalization of superclasses is not necessary for a class to be
>instantiated.  Finalization only does things necessary for direct
>instances of the class to exist, e.g. performing the slot-layout
>protocol.  Usually programmers need not worry about finalization,
>since it happens automatically the first time an instance is
>created.

I need to do this because I added rules to my classes and I need
to compile the superclasses rules before compiling the class rules
So far I compile these rules in the finalize-inheritance of the class
and I was surprised at first when I saw that the superclasses were
not finalized. But after looking more carefully at this it's better
 the way it is.

>If you really want to do this, you can of course cause it to happen
>by adding methods.  However, the MOP prohibits addiong methods to
>gfs specified in the standard where all specializers are classes
>also specified in the standard.  In other words, at least one of
>specializers must be some subclass, so you can only do this for
>some metaclass you write, not for standard-class directly.
>
>You should also be careful in that some superclasses (e.g.
>standard-object) might not be finalizable in some particular
>implementation.  Finalization of a large tree of superclasses
>is expensive, and computes lots space-consuming metaobjects that
>are otherwise useless if the class will not be instantiated.

Yes, I have a metaclass so I only wanted to add a method specialized on it.

Marc Battyani