Symbol (programming): Difference between revisions

Content deleted Content added
Support: a quote is not a part of a symbol
Lisp: symbols, which are not interned in a Lisp package
Line 42:
 
In Common Lisp symbols have the following attributes: a name, a value, a function, a list of properties and a package.<ref>[http://www.lispworks.com/documentation/HyperSpec/Body/t_symbol.htm Common Lisp HyperSpec, system class Symbol]</ref>
 
In Common Lisp it is also possible that a symbol is not interned in a package. Such symbols can be printed, but when read back, a new symbol needs to be created. Since it is not *interned*, the original symbol can't be retrieved from a package.
 
In Common Lisp symbols may use any characters, including whitespace, such as spaces and newlines. If a symbol contains a whitespace character it needs to be written as |this is a symbol|. Symbols can be used as identifiers for any kind of named programming constructs: variables, functions, macros, classes, types, goto tags and more.
Line 70 ⟶ 72:
<source lang="lisp">
package:exported-symbol
</source>
 
Symbols, which are not interned in a package, can also be created and have a notation:
<source lang="lisp">
#:uninterned-symbol
</source>