Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
equality operators in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-07-24 (19:28)
From: Raj Bandyopadhyay <rajb@r...>
Subject: equality operators in OCaml
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 

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 

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?