Skip to content
Mark Cox edited this page Dec 1, 2017 · 6 revisions

The specialization store system provides a new kind of function, called a store function, whose behavior is determined by the types of objects given as arguments to the store function.

Associated with each store function is a set of specialization objects. Each specialization encapsulates behavior and the domain for which the behavior is defined.

A premise of specialization store is that all specializations should perform the same task. Specializations should only differ in how the task is performed. This premise resolves ambiguities that arise when using types, rather than classes, to select the most specific specialization to apply.

Specialization store is a major component of a related system, the template-function system. A wiki page in that project outlines one of the problems the specialization store system was designed to address.

The following list summarizes the major differences between a store function and common lisp's generic function:

  • Types rather than classes are used to select behavior.
  • Optional, rest and/or keyword arguments are considered when determining behavior.
  • Initialization forms for optional and keyword arguments are part of the state of a store function.
  • Support for compile time optimizations.
  • No support for method/specialization combination.
  • No support for argument precedence.
  • No support for class precedence.

Tutorials

  1. An Introduction
  2. Optional, Keyword and Rest Arguments
  3. Compile Time Support
Clone this wiki locally