Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: [Caml-list] Semantics of physical equality
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michal Moskal <malekith@p...>
Subject: Re: [Caml-list] Semantics of physical equality
On Fri, Feb 27, 2004 at 05:16:06PM -0600, Kevin S. Millikin wrote:
> In the current problem, it can save me a great
> deal of effort involved in generating temporary identifiers that are
> guaranteed to be unique, and in wrapping library data structures that I
> am unwilling to change in order merely to tag them.

type t = V of int ref

let t1 = V (ref 0)
let t2 = V (ref 0)

In this case you can assume t1 != t2. If it is not a sum type, but
record type, you can use record with at least one mutable field.

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: When in doubt, use brute force. -- Ken Thompson :: UL++++$ C++ E--- a?

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners