All Manuals > LispWorks Delivery User Guide > 13 Efficiency considerations when coding for delivery


13.6 Avoid referencing type names

Referencing the name of a type (that is, a symbol) in code means that delivery cannot remove that type even if it is not used anywhere else. This is often seen in code using typep , typecase or subtypep to discriminate between types.

For example, if you have code like this:

(defun foo (x)
  (cond ((typep x 'class1) ...)
        ((typep x 'class2) ...)
        ((subtypep x 'class1000) ...)))

then delivery would keep all of the classes class1 , ... , class1000 even if nothing else references these classes.

Possible solutions are described in Referencing types via methods and Referencing types via predicates.

13.6.1 Referencing types via methods

13.6.2 Referencing types via predicates

LispWorks Delivery User Guide - 13 Dec 2011