A designator is nothing more (or less) than an object that designates another. There's nothing special in the language about them; the concept of designators is just one that makes certain programming practices easier. The glossary says:
designator n. an object that denotes another object. In the
dictionary entry for an operator if a parameter is described as a
designator for a type, the description of the operator is written in a
way that assumes that appropriate coercion to that type has already
occurred; that is, that the parameter is already of the denoted type.
For more detailed information, see Section 1.4.1.5 (Designators).
The link to that section is helpful:
A designator is an object that denotes another object.
Where a parameter of an operator is described as a designator, the
description of the operator is written in a way that assumes that the
value of the parameter is the denoted object; that is, that the
parameter is already of the denoted type. (The specific nature of the
object denoted by a “«type» designator” or a “designator for a
«type»” can be found in the Glossary entry for “«type» designator.”)
Being able to look for things in the glossary helps. For instance, a string designator is something that can stand for a string:
string designator n. a designator for a string; that is, an
object that denotes a string and that is one of: a character (denoting
a singleton string that has the character as its only element), a
symbol (denoting the string that is its name), or a string (denoting
itself). The intent is that this term be consistent with the behavior
of string; implementations that extend string must extend the meaning
of this term in a compatible way.
The standard also happens to define the function string that gets the string designated by a string designator:
Returns a string described by x; specifically:
- If x is a string, it is returned.
- If x is a symbol, its name is returned.
- If x is a character, then a string containing that one character is returned. string might perform additional, implementation-defined
conversions.
This simplifies the implementation of functions that have to work with strings and string like things. For instance, you can define a make-person function takes a string designator:
(defun make-person (name)
"Return a person with the name designated by NAME."
(list :name (string name)))
(defun person-name (person)
"Return the name of a person (a string)."
(getf person :name))
The concept of designator isn't anything but a programming convention that makes defining flexible APIs easier. Common Lisp was defined as a language to unite a bunch of existing Lisps, and it may have been one of the easier ways to unify the behavior of different implementations.
There's a concept of list designator that gets used in case
list designator n. a designator for a list of objects; that is,
an object that denotes a list and that is one of: a non-nil atom
(denoting a singleton list whose element is that non-nil atom) or a
proper list (denoting itself).
case keyform {normal-clause}* [otherwise-clause] => result*
normal-clause::= (keys form*)
keys—a designator for a list of objects. In the case of case,
the symbols t and otherwise may not be used as the keys designator. To
refer to these symbols by themselves as keys, the designators (t) and
(otherwise), respectively, must be used instead.
I don't know of a function that returns the list designated by a list designator, but it's easy enough to write (this doesn't handle the special behavior of t and otherwise that case needs, but it handles list designators in general):
(defun to-list (x)
"Return the list designated by x."
(if (listp x) x
(list x)))
Conventions like these can be useful in your own code sometimes, especially if you're defining things where there's a "registry" of things. E.g., if you have written either of:
(defmacro deftransform (name &rest args)
`(setf (gethash ',name *transforms*)
(make-transform ,@args)))
(defmacro deftransform (name &rest args)
(setf (get ',name 'transform) (make-transform ,@args)))
Then you can define the concept of a transform designator as either a transform object, or a symbol (which designates the value for the symbol in the *transforms* table, or the value of transform property on the symbol). E.g.:
(defun transform (x)
(if (transformp x) x
(gethash name *transforms*)))
(defun transform (x)
(if (transformp x) x
(get x 'transform)))
That might make parts of your code easier to use. Function designators are similar