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
operational semantics of = for objects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1998-03-27 (15:34)
From: Jerome Vouillon <vouillon@c...>
Subject: Re: operational semantics of = for objects

On Thu, 26 Mar 1998, Sorin Stratulat wrote:

> After comparing the results of the code (see below) executed on
> different versions of OCAML (1.05 and 1.07), I would like to know if
> anybody can explain me how the equality operator works for objects (if
> it is possible in both versions). As I understood from a previous
> message, overloading the operators is not supported yet.

In Ocaml 1.05, the equality operator did not work reliably for
objects. Indeed, objects was not treated specially. So, the operator
structurally compared the structures of the two objects and in some
cases tried to compare two methods and as a consequence failed.

In Ocaml 1.07, two objects are equals iff they are physically equals.

-- Jerome Vouillon