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

Re: Comments on comments on Chapter 1

Moon says:
	1-17 I still think it's wrong for list to be more specific than symbol
	in the CPL of null.  Consider the print-object methods.  Also consider
	the introjection of symbol between list and sequence, a surprising CPL.
Pavel says
    I agree with this.  I was surprised when I saw that LIST was
    more specific than SYMBOL.

The motivating example for this was something like:
(defmethod  some-mapper ((x listp) fn)
     (when x (funcall fn (car x)) (some-mapper (cdr x) fn))

(defmethod some-mapper ((x symbolp) fn)
     (some-mapper (look-up-in-table x *table*) fn)

Here one wants the recursion to NIL to be handled in the listp case
without having to think about the method on symbolp.  What is an example
in which one would want this another way.  I think we should in this
case be driven by some examples, since this pun in Lisp is
atheoretic.(NIL is the same as empty list)