Version française
Home     About     Download     Resources     Contact us    
Browse thread
operational semantics of == for methods
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier Bouyssou <olivier.bouyssou@w...>
Subject: operational semantics of == for methods
Here a example :

        Objective Caml version 2.02

# class test () =
  object
  method f () = ()
  end;;
class test : unit -> object method f : unit -> unit end

# let o = new test () ;;
val o : test = <obj>

# let f = o#f ;;
val f : unit -> unit = <fun>

# f == o#f ;;
- : bool = false

Why the last expression return false ?

Thanks in advance.

--
Olivier Bouyssou (F1NXH), Sobel                 olivier.bouyssou@wanadoo.fr
22 rue paul verlaine                            31570 st Foy d'Aigrefeuille
Tel : +33.5.62.18.81.82                         Fax : +33.4.68.94.54.16