Re: Questions about CLOS
- From: Kent M Pitman <pitman@xxxxxxxxxxx>
- Date: 28 Jul 2007 16:07:10 -0400
Rainer Joswig <joswig@xxxxxxx> writes:
Methods don't belong to classes. Methods are organized
in generic functions. Common Lisp supports multiple dispatch.
So a method can have more than one arg and dispatch is
over all these arguments.
I took his question to be about the MOP, though he may not have meant
it to be. That is, how one might write a method on the
method-addition mechanism itself, noticing that a method was being
added that specialized on a given class and doing something, perhaps
some kind of trace operation.
It sounds like a possible but admittedly suspect request, especially
for someone just starting out and "just trying to learn", since unless
his teaching text is suggesting implementing aspect-oriented
programming as a good way to learn CLOS, it doesn't sound lke a training
exercise.
Perhaps the right question at this point is: "Why?"
Knowing the intended purpose of this might lead to a very different
discussion. People who are new to a language are often assuming they
should do things in a certain way that may not apply.
.
- Follow-Ups:
- Re: Questions about CLOS
- From: Justin Paston-Cooper
- Re: Questions about CLOS
- References:
- Questions about CLOS
- From: Justin Paston-Cooper
- Re: Questions about CLOS
- From: Rainer Joswig
- Questions about CLOS
- Prev by Date: Is the following behavior defined by the standard or implementation specific?
- Next by Date: Re: Is the following behavior defined by the standard or implementation specific?
- Previous by thread: Re: Questions about CLOS
- Next by thread: Re: Questions about CLOS
- Index(es):
Relevant Pages
|
|