Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!ginosko!uunet!mcsun!ukc!edcastle!aiai!jeff From: jeff@aiai.uucp (Jeff Dalton) Newsgroups: comp.lang.lisp Subject: Re: Total ordering for Lisp objects ? Message-ID: <880@skye.ed.ac.uk> Date: 13 Sep 89 15:35:16 GMT References: <5896@lifia.imag.fr> <865@skye.ed.ac.uk> <2084@munnari.oz.au> Sender: news@aiai.ed.ac.uk Reply-To: jeff@aiai.uucp (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 20 In article <2084@munnari.oz.au> ok@cs.mu.oz.au (Richard O'Keefe) writes: >In article <865@skye.ed.ac.uk>, jeff@aiai.uucp (Jeff Dalton) writes: >> As you may know, Prolog has such an ordering. I think it would also >> be useful in Lisp. > >It is straightforward to define such an ordering on Prolog ground terms, >because Prolog has no assignment or replacement operations. A couple of people have now pointed out that, in Lisp, the order of objects might change if the objects were modified. Well, that's true, but similar problems occur with equal (equal objects become unequal) and with equal hash tables (an object might hash differently after a change). So this problem does not mean that such an order relation would be useless or impossible any more than equal hash tables are useless or impossible. For and eql-like ordering, I'd be happy with Barry Margolin's suggestion of an object-id table based on a "weak" hash table. -- Jeff