[comp.lang.misc] Total ordering for Lisp objects ?

phs@lifia.imag.fr (Philippe Schnoebelen) (09/09/89)

After reading C. R. Eliot's note "Manipulating sets in Common Lisp" (very
interesting, btw) in the last issue of Lisp Pointers, I have a question
about Lisp implementations:

	"Would it be possible to add a total ordering predicate on Lisp
	objects ?"

Among others, the advantage is that representation of sets as ordered lists
(or binary trees, ...) would be possible for any kind of data, not just
(e.g.) numbers. I can see at least one difficulty and would like opinions
about it. It stems from the requirement that:

	During one Lisp session, two Lisp objects must always remain in the
        same relative order. 

Assuming that, for cons cells, the order is simply the relative position in
memory of the cells, is it still possible to use copy-compact GC
algorithms ?, or other more sophisticated (e.g.  generation-scavenging)
techniques ?

Are there other places in Lisp where the stability requirement forbids one
to use advanced implementation techniques ? Which ones ?

Are there any languages (or specific implementations) where such an
ordering relation exists ? What are the consequences ?


Thanks,

--Philippe

[ Followups are to comp.lang.lisp ]