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

Re: NULL?



   Date: Tue, 7 Jan 1997 20:44:03 -0500
   From: Guillermo J. Rozas <gjr@martigny.ai.mit.edu>

   Furthermore, NULL? is listed as a library procedure, rather than a
   primitive.  This leads me to believe that the implied implementation
   is 

       (define (null? obj)
	 (and (not (boolean? obj))
	      (not (symbol? obj))
	      (not (char? obj))
	      (not (vector? obj))
	      (not (procedure? obj))
	      (not (pair? obj))
	      (not (number? obj))
	      (not (string? obj))
	      (not (port? obj))))

   This strikes me as somewhat ugly (in its asymmetry -- why pick on the
   empty list) and potentially bad.

Is there some reason that 

  (define (null? obj) (eq obj '()))

won't suffice?

I happen to hate the idea of something like this being unspecified.
Seems to me the worst of all possible worlds.  But I don't see this
as the central issue.