Next: Comments, Up: Lisp Data Types and Structures [Index]
The printed representation of an object is the format of the output
generated by the Lisp printer, prin1
, for that object. Every data type has
a unique printed representation.
The “read syntax” of an object is the format of the input
accepted by the Lisp reader (the function read
) for that object. In most
cases, an object’s printed representation is also a read syntax for the
object, but some types have no read syntax. See (elisp)Special Read Syntax.
Objects without read syntax are printed in “hash notation”, ‘#<type-name object-name>’. Hash notation cannot be read at all. The Lisp reader will signal an ‘invalid-read-syntax’ error whenever it encounters ‘#<’.
In Lisp, an expression is primarily a Lisp object and only secondarily the text that is the object’s read syntax.
When one evaluates an expression interactively, the Lisp interpreter first reads the textual representation of it, producing a Lisp object, and then evaluates that object. See (elisp)Evaluation. Evaluation and reading are separate activities. Reading returns the Lisp object represented by the text that is read; the object may or may not be evaluated later.
See [[(elisp)Input
Functions][Input Functions]] for a description of read
, the basic function for reading
objects.