All Manuals > LispWorks Delivery User Guide > 9 Delivery and Internal Systems


9.11 Symbol-name comparison

In a non-delivered LispWorks image, the form

(eq (symbol-name 'foo) (symbol-name 'foo))

evaluates to t . This behaviour is due to the way symbol names are cached. There is no requirement or guarantee that the results of successive calls to symbol-name be the same ( eq ) object.

After delivery, LispWorks symbol names are implemented differently such that the eq test above fails. Take care that your application does not rely on identity of symbol names.

Note: eq is not a reliable comparison of strings in general. Use equal for reliable string comparison.


LispWorks Delivery User Guide - 13 Dec 2011