* Difference between != and <>
@ 2005-08-30 21:49 spiralvoice
2005-08-30 22:00 ` [Caml-list] " yoann padioleau
0 siblings, 1 reply; 2+ messages in thread
From: spiralvoice @ 2005-08-30 21:49 UTC (permalink / raw)
To: caml-list
Hi,
is there a difference between != and <> in Ocaml code?
Greetings, spiralvoice
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Difference between != and <>
2005-08-30 21:49 Difference between != and <> spiralvoice
@ 2005-08-30 22:00 ` yoann padioleau
0 siblings, 0 replies; 2+ messages in thread
From: yoann padioleau @ 2005-08-30 22:00 UTC (permalink / raw)
To: spiralvoice; +Cc: caml-list
On 30 août 05, at 23:49, spiralvoice wrote:
> Hi,
>
> is there a difference between != and <> in Ocaml code?
Yes, the same kind of difference that between = and ==
"toto" <> "toto"
=> false
"toto" != "toto
=> true
let x = "toto" in x != x
=> false
It is a difference between structural equality (deep equality) and
physical equality (shallow equality, or "pointer" equality).
By the way, one wonderful thing with computer science is that you can
ask many questions to the machine :)
>
> Greetings, spiralvoice
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-30 22:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-30 21:49 Difference between != and <> spiralvoice
2005-08-30 22:00 ` [Caml-list] " yoann padioleau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox