Browse thread
[Caml-list] comparing references
-
Tahir H Butt
-
Michal Moskal
-
Hal Daume III
- Michal Moskal
-
Hal Daume III
-
Michal Moskal
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michal Moskal <malekith@p...> |
| Subject: | Re: [Caml-list] comparing references |
On Mon, Aug 11, 2003 at 12:57:46PM -0700, Hal Daume III wrote:
> > > I ask because my sum
> > > types can be big (I'm dealing with trees), so it would be good if when I
> > > want to check if two trees are the same, all I need to do is look at the
> > > references to them.
> >
> > Use == if you want to compare addresses.
>
> How much do you need to worry about, ex., the GC moving stuff around and
> messing this up?
You don't need to worry at all. GC moves all references to given object
at once. So comparison results are always the same.
--
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h
-------------------
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