From: cadence
Subject: what is a method qualifier
Date: 
Message-ID: <1173633932.567223.266410@c51g2000cwc.googlegroups.com>
Can someone please clarify some terminology for me.
What is a method qualfier?

If i define a method with the following:

(defmethod foo AFTER ((obj t)))

Then is AFTER the method qualifer? Or is the method qualifier actually
a list
containing AFTER?

How many qualifiers can a method have at one time?   If a method can
have more than one
qualifier then what is the concept?  Is it that every qualifer can
contribute something
independent to the behavior?  Or is it rather that every unique list
of qualifiers
implements a particular behavior?

thanks
-jim

From: Luís Oliveira
Subject: Re: what is a method qualifier
Date: 
Message-ID: <m1r6rvr6f7.fsf@deadspam.com>
"cadence" <·····@rdrop.com> writes:
> Can someone please clarify some terminology for me.
> What is a method qualfier?

http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_q.htm#qualifier

qualifier n. (of a method for a generic function) one of possibly
several objects used to annotate the method in a way that identifies its
role in the method combination. The method combination type determines
how many qualifiers are permitted for each method, which qualifiers are
permitted, and the semantics of those qualifiers.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
From: Pascal Costanza
Subject: Re: what is a method qualifier
Date: 
Message-ID: <55jhvbF24h8ufU1@mid.individual.net>
cadence wrote:
> Can someone please clarify some terminology for me.
> What is a method qualfier?
> 
> If i define a method with the following:
> 
> (defmethod foo AFTER ((obj t)))
> 
> Then is AFTER the method qualifer? Or is the method qualifier actually
> a list
> containing AFTER?

Every method has a list of qualifiers, which is empty for primary 
methods. Here, AFTER is a method qualifier, and the list of method 
qualifiers is '(AFTER).

> How many qualifiers can a method have at one time? 

As many as you like.

> If a method can
> have more than one
> qualifier then what is the concept?  Is it that every qualifer can
> contribute something
> independent to the behavior?  

Yes.

This becomes more clear when you study the long form of 
define-method-combination. Especially, you can use predicates to 
recognize the qualifiers you need, so you can do almost everything you 
want here.

In the CLOS MOP, you have even more fine-grained control by defining 
methods on compute-effective-method.


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/