Subject: Re: symbolp and nil
From: Erik Naggum <>
Date: 21 Apr 2001 12:21:02 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Christophe Rhodes
> What, apart from Lisp's history, makes the empty list special?

  The technical qualities of the thee objects you used make it hard to use
  them as false values.  Programming languages are not developed in void,
  so there are essential differences at a level where bad theory sees none.
  Theory as abstraction is great, as long as we remember that what it has
  ignored in the process of abstraction must be put back in to realize it.

  The empty list is a building block for the list made of conses.  I guess
  that's "Lisp's history", too, and that you could use that "argument"
  forever, but building lists from conses is a good decision.  It needs an
  "end of list" marker that takes no space.  It must be unique.  This means
  that the empty vector is a useless suggestion, because it is not unique.
  If it were attempted made unique, there would be a very different way to
  represent the empty vector from other vectors.  Like nil, it would have
  to have special code in accessors of its constituents, but what you do
  with a unique empty vector?  It has no purpose.  The empty hash-table is
  even less useful.  To make the empty hash-table "false" would require a
  fast and efficient means to decide whether a hash-table is empty.  This
  is not the case.  It is impossible to make as efficient as the test for
  object identity that nil does.  To use 0 as the false value would make
  sense if we didn't want a boolean type.  It is useful in C and the like
  because of the pun on NULL pointers, 0 used in a pointer context.

> I'll buy the argument that it's great for rapid prototyping in some
> circumstances, but so could my three examples above be.

  "Great for rapid prototyping" is an insult to the work of a large number
  of people and especially to their intelligence.  It's a rush to judgment
  by an ignorant, which is the one thing I really loathe.

> >     Somehow I preferred (CDR (ASSQ KEY A-LIST))
> (defvar *a-list* '((1 . 2) (2 . 3) (3 . nil)))
> (cdr (assq 3 *a-list*))

  Huh?  What was your argument?

  I found no peace in solitude.
  I found no chaos in catastrophe.
			-- :wumpscut: