Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!venera.isi.edu!news From: news@venera.isi.edu (News Service) Newsgroups: comp.lang.lisp Subject: Re: Total ordering for Lisp objects ? Message-ID: <9631@venera.isi.edu> Date: 13 Sep 89 22:16:22 GMT Organization: USC-Information Sciences Institute Lines: 22 ------- My initial response pointed out that comparisons based on structure were fine if you consider your "objects" to be defined by EQUAL. In that case a destructive change must be regarded as changing one object into another and it is quite reasonable that its position in a total ordering should change. If you want to consider "objects" defined by EQ then of course such schemes don't work, since they are sensitive to destructive operations while EQ-ness is not. In the same way that both EQ and EQUAL are useful, both types of orderings are useful (as well as others corresponding to other notions of equivalence). In either case, it is quite possible to program your own total ordering function, though there are various expenses to consider. In *SOME* implementations of lisp the EQ ordering is trivial (namely address comparison). My initial response also pointed out that this "benefit" has to be weighed against some others with which it is incompatible, e.g., garbage collectors that move objects to improve locality of reference. I hope this is all that needs to be said on the subject. From: donc@vaxa.isi.edu (Don Cohen) Path: vaxa.isi.edu!donc