[Xotcl] Issue with mixin delete

Scott Gargash scottg at atc.creative.com
Tue May 9 01:03:58 CEST 2006

Gustaf Neumann <neumann at wu-wien.ac.at> wrote on 05/08/2006 02:15:41 PM:

> > BTW, this will happen with any method, not just "destroy".
> >
> i know.
> >
> > Is it not considered acceptable to ever remove a mixin class?
> >
> > When is it valid to remove a mixin if removing it corrupts the method
> > chaining?
> >
> removing a mixin class from the mixin list does not "corrupt" the chain
> in the sense that there
> is a memory corruption etc. The current implementation does not allow to
> remove
> ***active*** mixin classes, this are the classes of which the method is
> currently executing.

I did a little more experimenting, and it's a little stronger than that.  You also can't remove a
mixin from anything invoked by the active mixin. I.e., you can't forward the "mixin delete" to an
object of another class.  If the mixin to be deleted is present in the call stack, it appears that
the mixin can't be deleted. Not that I expected it to work, but it seems worth noting.

> It looks quite easy to give a reasonable error message, when the
> currently active
> mixin class is deleted, it will be more expensive to handle this problem in
> a friendly way.

Is the expense something that would be encountered on every method invocation, or would it only be
paid when deleting a mixin?

I really ought to spend some time with the source...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20060508/9fc245ae/attachment.html

More information about the Xotcl mailing list