From: Fernando
Subject: Multiple dispatch
Date: 
Message-ID: <heg9a0p3sj19t7akds8pq0pcmf1g7q43qt@4ax.com>
Hi,

Can someone please explain how CLOS selects the appropriate GF based on the
types of the arguments? O:-)

Thanks

From: Kaz Kylheku
Subject: Re: Multiple dispatch
Date: 
Message-ID: <cf333042.0405141426.54a2c810@posting.google.com>
Fernando <···@NOSPAMeasyjob.net> wrote in message news:<··································@4ax.com>...
> Hi,
> 
> Can someone please explain how CLOS selects the appropriate GF based on the
> types of the arguments? O:-)

This material is covered in the HyperSpec, 7.6.6 Method Selection and Combination.
From: mikel
Subject: Re: Multiple dispatch
Date: 
Message-ID: <KY5pc.67165$fh4.15397@newssvr25.news.prodigy.com>
Fernando wrote:

> Hi,
> 
> Can someone please explain how CLOS selects the appropriate GF based on the
> types of the arguments? O:-)

Someone else already posted a link to the Common Lisp Hyperspec, which 
will give you all the details of how it's specified to work. The 
implementation details vary, of course, from one implementation to another.

The basic idea is that a generic function knows about an argument list 
and some methods. When you call the generic function, it looks at the 
actual arguments and figures out their types. Then it finds the method 
that best matches that set of types and calls it with the actual arguments.

The HyperSpec better explains things like 'best matches' and 'figures 
out their types' and so on.
From: Lars Brinkhoff
Subject: Re: Multiple dispatch
Date: 
Message-ID: <857jvfvx71.fsf@junk.nocrew.org>
Fernando <···@NOSPAMeasyjob.net> writes:
> Can someone please explain how CLOS selects the appropriate GF based on the
> types of the arguments? O:-)

You probably want to know about method selection and combination:
http://clhs.lisp.se/Body/07_ff.htm

-- 
Lars Brinkhoff,         Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting    http://www.brinkhoff.se/
From: Paul F. Dietz
Subject: Re: Multiple dispatch
Date: 
Message-ID: <CsKdnVFFh-Fk4jjd4p2dnA@dls.net>
Fernando wrote:

> Can someone please explain how CLOS selects the appropriate GF based on the
> types of the arguments? O:-)


This paper describes how it was done in PCL

http://www2.parc.com/csl/groups/sda/publications/papers/Kiczales-Andreas-PCL/for-web.pdf

	Paul