From: Elnatan Reisner <elnatan@cs.umd.edu>
To: OCaml List <caml-list@yquem.inria.fr>
Subject: Pervasives.compare != Pervasives.compare
Date: Fri, 12 Nov 2010 00:57:18 -0500 [thread overview]
Message-ID: <A535C303-8106-4332-BDBA-3AF5247A5ED4@cs.umd.edu> (raw)
I was surprised when I noticed the following behavior:
Objective Caml version 3.11.2
# compare == compare;;
- : bool = false
# let f = compare;;
val f : 'a -> 'a -> int = <fun>
# f == compare;;
- : bool = false
# f == f;;
- : bool = true
# let g = compare;;
val g : 'a -> 'a -> int = <fun>
# f == g;;
- : bool = false
Playing around a bit more, I seemed to find that every time you access
an 'external' function, you get a distinct reference (is there a
better term?) to it. This seems a bit odd to me. Can someone explain?
Thanks,
Elnatan
next reply other threads:[~2010-11-12 5:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 5:57 Elnatan Reisner [this message]
2010-11-12 10:50 ` [Caml-list] " Stéphane Glondu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A535C303-8106-4332-BDBA-3AF5247A5ED4@cs.umd.edu \
--to=elnatan@cs.umd.edu \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox