System Class symbol

Class Precedence List:

symbol, t

Description:

11.0.0 11 10.3.0 2 10.3.0 3 11.0.0 12 Some stuff about INTERN, IMPORT, SHADOWING-IMPORT, UNINTERN, etc. was commented out.

Symbols are used for their object identity to name various entities in Common Lisp, including (but not limited to) linguistic entities such as variables and functions.

Symbols can be collected together into packages. A symbol is said to be interned in a package if it is accessible in that package; the same symbol can be interned in more than one package. If a symbol is not interned in any package, it is called uninterned.

An interned symbol is uniquely identifiable by its name from any package in which it is accessible.

!!! Sandra: I REALLY dislike this terminology. Can't we call these "attributes" rather than "components" and leave out the discussion of "cells" entirely?

My attempt at simplifying some of this convoluted discussion of ``cells'' follows. --sjl 16 Mar 92 \term{Symbols} have the following components, or \term{cells}. (In each case, it is \term{implementation-dependent} how these \term{cells} are represented. For example, they might be explicitly represented as a ``slots'' in the \term{symbol} itself, or they might be represented as external associations between the \term{symbol} and the \term{cell} \term{value} (if any) in some \term{environment} or table, or in some cases they might not be explicitly represented at all.)

Symbols have the following attributes. "historically" => "historical" per Boyer/Kaufmann/Moore #11 (by X3J13 vote at May 4-5, 1994 meeting) -kmp 9-May-94For historical reasons, these are sometimes referred to as cells, although the actual internal representation of symbols and their attributes is implementation-dependent.

Operations on a symbol's value cell and function cell are sometimes described in terms of their effect on the symbol itself, but the user should keep in mind that there is an intimate relationship between the contents of those cells and the global variable or global function definition, respectively.

Symbols are used as identifiers for lexical variables and lexical function definitions, but in that role, only their object identity is significant. Common Lisp provides no operation on a symbol that can have any effect on a lexical variable or on a lexical function definition.

See Also:

Section 2.3.4 (Symbols as Tokens), Section 2.3.1.1 (Potential Numbers as Tokens), Section 22.1.3.3 (Printing Symbols)