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
[Caml-list] Some things are more equal than others
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jim Farrand <jim@f...>
Subject: [Caml-list] Some things are more equal than others

Silly newbie question coming up...

What's the difference between (=) and (==)?

I know that this is almost certainly a case of RTFM, but I can't seem to find 
the right place.  6.7.4 mentions "structural" and "physical" equality, but 
doesn't define either.

My guess is that "physical" equality is "are these the same object", and 
structural equality is "are these objects equivelent".  Hence:

# "Jim"=="Jim";;
- : bool = false
# "Jim"="Jim";;
- : bool = true€

I thought I'd better check I'm guessing right, or I will almost certainly 
fall over this sometime in the future.  :)

Bug reports:  FAQ:
To unsubscribe, mail  Archives: