Pascal Cuoq a écrit :
>> Elnatan Reisner wrote:
>>> Is there something that can complete this analogy:
>>> (=) is to (==) as Pervasives.compare is to ___?
>>>
> The simple solution is to number at creation the objects that you want to
> physically compare, using an additional field.

You can do that while hash-consing your values, which has many other
benefits than allowing physical comparison, as explained in this paper:

  http://www.lri.fr/~filliatr/ftp/publis/hash-consing2.pdf

Ocaml code for hash-consing can be found on that page:

  http://www.lri.fr/~filliatr/software.en.html

Hope this helps,
-- 
Jean-Christophe

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to