Re: Specializing slot-value-using-class in OpenMCL
- From: Larry Clapp <larry@xxxxxxxxxxxx>
- Date: Wed, 30 May 2007 18:27:07 -0400
On 2007-05-30, Slava Akhmechet <coffeemug@xxxxxxxxx> wrote:
Pascal Costanza <pc@xxxxxxxxx> writes:
I hope this helps.Thank you, it helps a lot! I just tried the fix and it works. I
only have one last question. Why are metaclasses are not inherited?
(defclass a ()
(slot)
(:metaclass somemeta))
(defclass b ()
(slot2))
Metaclass of 'b' will be standard-class (which causes problems). I
manually added the metaclass declaration to all relevant class, but
is there a way to simply propagate it from base class?
I'm not Pascal, but did you mean
(defclass b (a)
(slot2)) ;^^^
?
As far as why it's not inherited, I don't know for sure, but it seems
to me that the inheritance of metaclass in the presence of multiple
inheritance would be very complex.
You'd probably do better to write a define-somemeta macro along the
lines of:
(defmacro define-somemeta (name &body body)
`(defclass ,name
,@body
(:metaclass somemeta)))
(untested)
-- Larry
.
- Follow-Ups:
- Re: Specializing slot-value-using-class in OpenMCL
- From: Slava Akhmechet
- Re: Specializing slot-value-using-class in OpenMCL
- References:
- Specializing slot-value-using-class in OpenMCL
- From: Slava Akhmechet
- Re: Specializing slot-value-using-class in OpenMCL
- From: Pascal Costanza
- Re: Specializing slot-value-using-class in OpenMCL
- From: Slava Akhmechet
- Re: Specializing slot-value-using-class in OpenMCL
- From: Pascal Costanza
- Re: Specializing slot-value-using-class in OpenMCL
- From: Slava Akhmechet
- Specializing slot-value-using-class in OpenMCL
- Prev by Date: Re: redefining SBCL prompts
- Next by Date: Re: Specializing slot-value-using-class in OpenMCL
- Previous by thread: Re: Specializing slot-value-using-class in OpenMCL
- Next by thread: Re: Specializing slot-value-using-class in OpenMCL
- Index(es):
Relevant Pages
|
|