[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: symbol-class is bad name



This message attempts to summarize this issue so that we can make the
appropriate changes to chapter 1 and 2.

After looking at everyone's comments, it seems like we should replace
symbol-class with find-class.

Find-class will take an optional second argument saying whether or not
is should signal an error if there is no class with that name.  The
default value of the argument will be t.  If that argument is nil, and
there is no class with the given name, find-class will return nil.  We
will say that the first argument to find-class must be a symbol.  Others
can extend that later if they want.

cboundp and cmakunboundp will be removed.  cboundp can be replaced with
(find-class <name> nil).  cmakunbound can be replaced with (setf
(find-class <name>) nil).

This could be defined as follows:

(defun find-class (symbol &optional (errorp t))
  (let ((class (<lookup-in-name-table> symbol)))
    (cond (class class)
          (errorp (error "No class named ~S." symbol))
          (t nil))))

Unless there are further objections to this I propose the changes be
made to chapter 1 and 2.
-------