[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: email@example.com
- Subject: documentation
- From: firstname.lastname@example.org
- Date: Thu, 14 May 87 14:37:03 PDT
- Posted-date: Thu, 14 May 87 14:37:03 PDT
What should the following do?
(documentation 'doc 'doc)
Per page 440 of CLtL, there is a list of documentation types, but no mention
of what to do if given some other symbol. Should it return NIL? Should it
signal or "be" an error? Can it return some other arbitrary value, or is it
totally up to the implementor?
Likewise, (setf (documentation 'doc 'doc) "xyz"),
I have an implementation here that allows documentation to work this way. It
appears to more or less syntactic-sugar for property lists, 'cuz in the above
case, the setf will put "xyz" on the symbol DOC as it documentation type DOC.
I have another implementation which is strictly by the book in that if it is
not on that list of legal documentation types, it signals an error.
Note: The first implementation is a bit too relaxed--it allows (setf
(documentation "FOO" 'doc) "xyz"), which is clearly incorrect 'cuz "Both
arguments must be symbols".