caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* equality operators in OCaml
@ 2008-07-24 19:27 Raj Bandyopadhyay
  2008-07-24 22:15 ` [Caml-list] " Vincent Hanquez
  2008-07-24 22:32 ` Jon Harrop
  0 siblings, 2 replies; 8+ messages in thread
From: Raj Bandyopadhyay @ 2008-07-24 19:27 UTC (permalink / raw)
  To: caml-list

Hi OCaml folk

I apologize if I've been asking too many questions on this list 
recently, but I'm working on a heavy OCaml application and need help 
sometimes.

I am having a disagreement with a colleague about how the equality 
operators in OCaml work and am trying to resolve it conclusively.

1) I understand that the '==' operator is basically a pointer comparison 
i.e. a==b true  iff a and b are the same entity. Is this true?

2) Where can I find the code implementing the '==' operator in the OCaml 
code?

3) In case I do want to check object identity and can use the == 
operator, would it be faster to use '==', '=' or a match statement?

Thanks
Raj


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

end of thread, other threads:[~2008-07-25 22:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-24 19:27 equality operators in OCaml Raj Bandyopadhyay
2008-07-24 22:15 ` [Caml-list] " Vincent Hanquez
2008-07-24 22:32 ` Jon Harrop
2008-07-25  1:40   ` Peng Zang
2008-07-25 10:34     ` Christophe TROESTLER
2008-07-25 12:04       ` Peng Zang
2008-07-25 20:14     ` Matthew William Cox
2008-07-25 22:27       ` Peng Zang

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).