Two objects S (in source code) and C (in compiled code) are defined to be similar if and only if they are both of one of the types listed here (or defined by the implementation) and they both satisfy all additional requirements of similarity indicated for that type.
Implementations providing additional, implementation-defined attributes must define whether and how non-simple characters can be regarded as similar.
Two interned symbols S and C are similar if their names are similar, and if either S is accessible in the current package at compile time and C is accessible in the current package at load time, or C is accessible in the package that is similar to the home package of S.
(Note that similarity of symbols is dependent on neither the current readtable nor how the function read would parse the characters in the name of the symbol.)
Note that although a package object is an externalizable object, the programmer is responsible for ensuring that the corresponding package is already in existence when code referencing it as a literal object is loaded. The loader finds the corresponding package object as if by calling find-package with that name as an argument. An error is signaled by the loader if no package exists at load time.
(Note that since C has been processed by the file compiler, it cannot be used directly as an argument to random because random would perform a side effect.)
Two arrays of rank other than one, S and C, are similar if the rank of S is similar to the rank of C, each dimension[1] of S is similar to the corresponding dimension[1] of C, the actual array element type of S is similar to the actual array element type of C, and each element of S is similar to the corresponding element of C.
In addition, if S is a simple array, then C must also be a simple array. If S is a displaced array, has a fill pointer, or is actually adjustable, C is permitted to lack any or all of these qualities.
If there is more than one possible one-to-one correspondence between the keys of S and C, the consequences are unspecified. A conforming program cannot use a table such as S as an externalizable constant.