Conference paper Open Access

Method Combinators

Verna, Didier

In traditional object-oriented languages, the dynamic dispatch algorithm is hardwired: for every polymorphic call, only the most specific method is used. CLOS, the Common Lisp Object System, goes beyond the traditional approach by providing an abstraction known as "method combinations": when several methods are applicable, it is possible to select several of them, decide in which order they will be called, and how to combine their results, essentially making the dynamic dispatch algorithm user-programmable.

Although a powerful abstraction, method combinations are under-specified in the Common Lisp standard, and the MOP, the Meta-Object Protocol underlying many implementations of CLOS, worsens the situation by either contradicting it or providing unclear protocols. As a consequence, too much freedom is granted to conforming implementations. The exact or intended behavior of method combinations is unclear and not necessarily coherent with the rest of CLOS.

In this paper, we provide a detailed analysis of the problems posed by method combinations, the consequences of their lack of proper specification in one particular implementation, and a MOP-based extension called "method combinators", aiming at correcting these problems and possibly offer new functionality.

Files (1.4 MB)
Name Size
verna.18.els.pdf
md5:4a872e5faf6f29b644a4e8867047b3b6
520.8 kB Download
verna.18.els.slides.pdf
md5:e197d45e607d53f9dd6ee01a5cb7d6f8
833.4 kB Download
24
11
views
downloads
All versions This version
Views 2424
Downloads 1111
Data volume 5.7 MB5.7 MB
Unique views 2222
Unique downloads 99

Share

Cite as