Code Comments
Programming Forum and web based access to our favorite programming groups.I'm looking for any articles that describe how a particular method/ function is chosen for generics/multi-methods. Googling for words like "generic", "method", "signature", and "function" hasn't been as rewarding as I would have hoped... I found one article for how the R programming language does it, and I've looked at how the python multimethod implementation does it, but I would be interested in others (TinyCLOS?) too. Thanks in advance for any replies!
Post Follow-up to this messageScott wrote: > I'm looking for any articles that describe how a particular method/ > function is chosen for generics/multi-methods. Googling for words > like "generic", "method", "signature", and "function" hasn't been as > rewarding as I would have hoped... I found one article for how the R > programming language does it, and I've looked at how the python > multimethod implementation does it, but I would be interested in > others (TinyCLOS?) too. > > Thanks in advance for any replies! The CLOS / ANSI Common Lisp specification has a pretty detailed description of method selection and combination. See http://www.lispworks.com/documentat.../Body/07_ff.htm for an online reference. Since CLOS provides a lot of (extremely useful) bells and whistles, the essential steps may be a bit blurred, but it's certainly possible to get through the description. There are a couple of papers about CLOS listed at http://www.dreamsongs.com/CLOS.html - "CLOS in Context: The Shape of the Design Space" is an especially interesting read, because it provides background material for some of the design decisions behind CLOS, which helps a lot to understand them. "The Art of the Metaobject Protocol" (AMOP) gives an introduction into metaobject protocols, based on variations of CLOS. It also contains a specification of the CLOS Metaobject Protocol, which can also be found online at http://www.lisp.org/mop/ . That book is one of the best books in computer science I am aware of, it covers some very fundamental and important programming concepts. It also includes Closette, a subset of CLOS from which you can derive the essential details of generic function invocation / method selection and combination. Tiny CLOS is an even smaller subset, and it should be possible to understand the approach from just reading its source code. However, AMOP is quite essential, still. Dylan is a close cousin of CLOS, closer to Scheme than to Common Lisp at its core, with a non-Lisp more mainstreamish syntax. The Dylan language specification can be found at http://www.opendylan.org/books/drm/ which should cover Dylan's version of generic function semantics pretty well. There exist a couple of object systems for Scheme, many of which are more or less derivatives of CLOS, or at least the generic function approach. You can find a listing of them at http://community.schemewiki.org/?object-systems I hope this helps. Best, Pascal -- 1st European Lisp Symposium (ELS'08) http://prog.vub.ac.be/~pcostanza/els08/ My website: http://p-cos.net Common Lisp Document Repository: http://cdr.eurolisp.org Closer to MOP & ContextL: http://common-lisp.net/project/closer/
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.