On Tue, 11 Mar 2008 16:35:50 -0700 (PDT), Steve Horne
<stephenhorne100@[EMAIL PROTECTED]
> wrote:
>I'm interested in data structures for efficient overload resolution.
> :
>What I'm really interested in is the case with multiple independent
>parameters. I have very little idea how to even approach this problem.
>The only guess I can make is along the lines of treating each
>parameter as a separate dimension and using a spacial structure such
>as R-trees, quadtrees or whatever, but of course normal spacial
>indexes require that the keys are fully ordered along each dimension.
Have you looked at how CLOS (Common Lisp Object System) handles
multimethods? CLOS builds a discrimination tree which orders the type
tests so as to eliminate as many potentials as possible at each
decision point. Lisp happens to build the tree dynamically at runtime
but it could just as well be done statically at compile time.
There are a number of open source Lisps (CMUCL, SBCL, CLisp, etc.)
available for code study.
George
--


|