Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!uwvax!ai!neves
From: neves@ai.WISC.EDU (David M. Neves)
Newsgroups: comp.lang.lisp
Subject: Re: Importance of REPLACA, REPLACD, and the like?
Message-ID: <3927@spool.WISC.EDU>
Date: Sat, 18-Jul-87 20:41:36 EDT
Article-I.D.: spool.3927
Posted: Sat Jul 18 20:41:36 1987
Date-Received: Sun, 19-Jul-87 06:39:43 EDT
References: <22@citcom.UUCP> <13278@topaz.rutgers.edu> <6601@reed.UUCP>
Sender: news@spool.WISC.EDU
Reply-To: neves@ai.WISC.EDU (David M. Neves)
Organization: U of Wisconsin CS Dept
Lines: 27
Summary: Really why EQUAL cannot replace EQ

In article <6601@reed.UUCP> bart@reed.UUCP (Bart Massey) writes:
>At Reed college we are currently doing almost all of our lisp
>programming in an in-house dialect which supports neither destructive
>list functions nor dotted pairs.
...
>In case anyone is interested, the following major changes in the
>language were also implemented, and have proven useful:
>
>- Elimination of eq: Using a properly written version of equal, eq is
>the first thing to happen anyhow, and we've never encountered a
>situation where knowing that two lists were non-eq is "good enough".
>

I can construct such a situation.  Imagine a list of lists.  You want
to find out if a list you have a pointer to is contained within that
list (i.e. MEMBER).  You want to use EQ as the comparison function for
efficiency -- especially if the first few characters of the non eq
lists are the same as the one you are looking for.

e.g.
look for (a b c) object in
List:  ( (a b z) (a b a) (a b c d) (a b q) (a b r) (a b c) )


David Neves, Computer Sciences Department, University of Wisconsin-Madison
Usenet:  {allegra,heurikon,ihnp4,seismo}!uwvax!neves
Arpanet: neves@cs.wisc.c.cN