From ... Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!uio.no!Norway.EU.net!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: symbolp and nil Date: 21 Apr 2001 12:21:02 +0000 Organization: Naggum Software, Oslo, Norway Lines: 44 Message-ID: <3196844462300865@naggum.net> References: <3196799095379608@naggum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 987855662 15371 195.0.192.66 (21 Apr 2001 12:21:02 GMT) X-Complaints-To: newsmaster@eunet.no NNTP-Posting-Date: 21 Apr 2001 12:21:02 GMT Mail-Copies-To: never User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: newsfeed.google.com comp.lang.lisp:9258 * 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? #;Erik -- I found no peace in solitude. I found no chaos in catastrophe. -- :wumpscut: