Browse thread
Re: [Caml-list] possible to define a type where = is forbidden ?
[
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: | Thomas Fischbacher <Thomas.Fischbacher@P...> |
| Subject: | EQ hash tables? |
On Mon, 10 Oct 2005, Thomas Fischbacher wrote:
> When you want to associate extra data to stuff that should retain nice
> comparison properties, another technique which might be useful or not is
> to use a weak pointer hash, mapping subtrees to positions.
Actually, this brings me to a question I wanted to ask for a long time:
while I never used this so far, I just assumed that OCaml does provide
hash tables where keys are compared w.r.t. "being the same" ('==' , that
is), rather than only hash tables where keys are compared for "being
equal" (say, '=').
Of course, "EQ hash tables" have to be treated in a slightly special way
when talking about stop© GCing.
So, do they really exist, or don't they?
--
regards, tf@cip.physik.uni-muenchen.de (o_
Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)