Introduction The =specializable= system extends CLOS (the Common Lisp Object System) and its meta-object protocol with a form of generalized dispatch by introducing a new =generalizer= meta-object.
This system only works in the [[http://www.sbcl.org][SBCL]] Common Lisp implementation.
The specializable system allows meta-programmers to implement new kinds of specializers which can then be used by programmers like this:
(defmethod my-method ((parameter (SPECIALIZER-KIND &rest SPECIALIZER-SYNTAX))) …)
where =SPECIALIZER-KIND= is a symbol designating the new specializer kind and =SPECIALIZER-SYNTAX= is a form which adheres to the respective syntax and parametrizes the specializer[fn:1].
More concretely, assuming a new specializer kind designated by =cl:cons=, the above example would become:
(defmethod my-method ((parameter (cons foo))) …)
A detailed description can be found in the associated publications [fn:2][fn:3].
[[https://travis-ci.org/sbcl/specializable][https://travis-ci.org/sbcl/specializable.svg]]
Provided Specializers
Based on this extension, the following kinds of =specializer= s are provided as seperate [[http://common-lisp.net/project/asdf][ASDF]] systems:
Footnotes
[fn:1] While the syntax =(SPECIALIZER-KIND &rest SPECIALIZER-SYNTAX)= is the common case and benefits from supporting machinery such as =specializable:define-extended-specializer-syntax=, it is also possible to define new kinds of specializers with entirely different syntax. See [[file:src/prototype-specializer]] for an example.
[fn:2] Rhodes, C., Moringen, J., Lichteblau, D.: Generalizers: New Metaobjects for Generalized Dispatch (2014). Available at http://arxiv.org/abs/1403.2765.
[fn:3] Newton, J., Rhodes, C.: Custom Specializers in Object-Oriented Lisp (2008). Available at http://www.jucs.org/jucs_14_20/custom_specializers_in_object.