Version française
Home     About     Download     Resources     Contact us    
Browse thread
Very very short question on objects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christian RINDERKNECHT <rinderkn@h...>
Subject: Very very short question on objects
Hi everybody,

I'm getting started with OCaml objects and, trying to compose
functional updates, I ran into something like the following
toy example:

        Objective Caml version 2.02
 
# class x = 
    object
      method private f = ()
      method g = {< >} # f
    end
  ;;
class x : object method f : unit method g : unit end
# 

Method [f] is not private... Shouldn't be this an error?


Best regards,

Christian

-----------------------------------------------------------------------
Christian Rinderknecht                     Phone +33 (0)1 60 76 44 43
Institut National des Télécommunications   Fax   +33 (0)1 60 76 47 11
Département Logiciels Réseaux (LOR)        WWW
9, Rue Charles Fourier, F-91011 Évry Cedex