Re: CLOS question
- From: stamant@xxxxxxxx (Rob St. Amant)
- Date: Sun, 29 Jul 2007 18:13:17 -0400
Scott Burson <FSet.SLB@xxxxxxxxx> writes:
On Jul 29, 2:27 pm, stam...@xxxxxxxx (Rob St. Amant) wrote:
I have what seems like a familiar CLOS question, but a quick Google
search doesn't turn up an answer: I have a method, m, and an after
method for it. The after method is specialized on class c. I'd like
to define a class d that inherits c, and have instances of d behave
just like instances of c *except* for that single after method.
This suggests to me that you have analyzed your domain incorrectly.
It would seem that D is not really a subclass of C if you don't want
it to inherit the full behavior of M. Indeed, based on your last
sentence, it sounds like it's the other way around: C is a subclass of
D!
Of course you've left out a lot of information in order to abstract
the problem, so I don't know if this is really correct. But it's the
kind of question I would ask.
Hmm. . . It turns out that there's a strong sense in which you're
right about this (which I didn't realize): I've come across this issue
in writing some software for part of an AI programming course. The
general approach involves building a simple system and showing how it
can be extended, incrementally, to gain more functionality or
generality. It does seem reasonable to say, "Okay, we can get so far
with class C, but it has limited generality. Let's see what we can do
if we build D from scratch, applying what we've learned. C will end
up being a special case of D." Thanks for the thought.
.
- Follow-Ups:
- Re: CLOS question
- From: Scott Burson
- Re: CLOS question
- References:
- CLOS question
- From: Rob St. Amant
- Re: CLOS question
- From: Scott Burson
- CLOS question
- Prev by Date: Re: I symbolics still selling machines? does anyone use the lisp genera os?
- Next by Date: Re: CLOS question
- Previous by thread: Re: CLOS question
- Next by thread: Re: CLOS question
- Index(es):
Relevant Pages
|