caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Pervasives.compare != Pervasives.compare
@ 2010-11-12  5:57 Elnatan Reisner
  2010-11-12 10:50 ` [Caml-list] " Stéphane Glondu
  0 siblings, 1 reply; 2+ messages in thread
From: Elnatan Reisner @ 2010-11-12  5:57 UTC (permalink / raw)
  To: OCaml List

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-12 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-12  5:57 Pervasives.compare != Pervasives.compare Elnatan Reisner
2010-11-12 10:50 ` [Caml-list] " Stéphane Glondu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).