canonicalize-defclass-options
. Now I have a nice inconsistency in AMOP to add to the complaints.I have believed for some time, for some reason, that this is the standard slot option canonicalizer, excepting the special cases:
(defun canonicalize-defclass-option (opt)In other words, if you gave a single argument, like
`(',(car opt)
',(if (typep (cdr opt) '(cons t null))
(cadr opt)
(cdr opt))))
(:opt val)
, it wouldn't be listified. A little weird, with a nasty special case, but a good attempt at dealing with both listy and atomy class options.Thankfully, AMOP has two contradictory interpretations, neither of which are the above. First, the example on page 287, which would have it:
`(',(car opt)Finally, on page 148, hiding from the prying eyes of back-of-the-book indexed content (nowhere near the entries on
',(cadr opt))
defclass
), the true behavior:Any other class options become the value of keyword arguments with the same name. The value of the keyword argument is the tail of the class option.
`(',(car opt)I also previously thought the defclass options to be evaluated, but never mind that.
',(cdr opt))
No comments:
Post a Comment