From: Peter Seibel
Subject: Rules for combining classes with different meta-classes?
Date:
Message-ID: <m27jffg9d8.fsf@gigamonkeys.com>
Okay, I'm sure this is documented somewhere obvious but I'm spacing on
where. My question is, is it (ever) possible to do this:
(defclass foo ()
()
(:metaclass something-other-than-standard-class))
(defclass mixin () ())
(defclass foo-with-mixin (foo mixin)
()
(:metaclass something-other-than-standard-class))
-Peter
--
Peter Seibel * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp * http://www.gigamonkeys.com/book/
From: Andreas Thiele
Subject: Re: Rules for combining classes with different meta-classes?
Date:
Message-ID: <dc1bm2$m94$03$1@news.t-online.com>
"Peter Seibel" <·····@gigamonkeys.com> schrieb im Newsbeitrag ···················@gigamonkeys.com...
> Okay, I'm sure this is documented somewhere obvious but I'm spacing on
> where. My question is, is it (ever) possible to do this:
>
> (defclass foo ()
> ()
> (:metaclass something-other-than-standard-class))
>
> (defclass mixin () ())
>
> (defclass foo-with-mixin (foo mixin)
> ()
> (:metaclass something-other-than-standard-class))
>
> -Peter
>
> --
> Peter Seibel * ·····@gigamonkeys.com
> Gigamonkeys Consulting * http://www.gigamonkeys.com/
> Practical Common Lisp * http://www.gigamonkeys.com/book/
Hi Peter,
yes, this is possible. VALIDATE-SUPERCLASS has to be implemented for the specific combination of
class and superclass. This informs CLOS that metaclasses are compatible.
I think a metaclass can have arbitrary complex influences on inheritance dependencies. This seems to
be the reason why CLOS requires you to allow certain inheritances.
Andreas
From: Andreas Thiele
Subject: Re: Rules for combining classes with different meta-classes?
Date:
Message-ID: <dc1bvt$l4i$05$1@news.t-online.com>
"Andreas Thiele" <··········@nospam.com> schrieb im Newsbeitrag
····················@news.t-online.com...
>
> "Peter Seibel" <·····@gigamonkeys.com> schrieb im Newsbeitrag
···················@gigamonkeys.com...
> > Okay, I'm sure this is documented somewhere obvious but I'm spacing on
> > where. My question is, is it (ever) possible to do this:
> >
> > (defclass foo ()
> > ()
> > (:metaclass something-other-than-standard-class))
> >
> > (defclass mixin () ())
> >
> > (defclass foo-with-mixin (foo mixin)
> > ()
> > (:metaclass something-other-than-standard-class))
> >
> > -Peter
> >
> > --
> > Peter Seibel * ·····@gigamonkeys.com
> > Gigamonkeys Consulting * http://www.gigamonkeys.com/
> > Practical Common Lisp * http://www.gigamonkeys.com/book/
>
> Hi Peter,
>
> yes, this is possible. VALIDATE-SUPERCLASS has to be implemented for the specific combination of
> class and superclass. This informs CLOS that metaclasses are compatible.
>
> I think a metaclass can have arbitrary complex influences on inheritance dependencies. This seems
to
> be the reason why CLOS requires you to allow certain inheritances.
>
> Andreas
>
>
Ooops,
didn't notice you asked for a literature reference. You'll find this in the AMOP p. 240 or what your
issues index lists for VALIDATE-SUPERCLASS.
Andreas
From: Peter Seibel
Subject: Re: Rules for combining classes with different meta-classes?
Date:
Message-ID: <m23bq3g1tz.fsf@gigamonkeys.com>
"Andreas Thiele" <··········@nospam.com> writes:
> Ooops,
>
> didn't notice you asked for a literature reference. You'll find this
> in the AMOP p. 240 or what your issues index lists for
> VALIDATE-SUPERCLASS.
Cool, thanks.
-Peter
--
Peter Seibel * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp * http://www.gigamonkeys.com/book/