Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Protected methods
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dmitry Bely <dbely@m...>
Subject: Re: [Caml-list] Protected methods
Alessandro Baretta <alex@baretta.com> writes:

> I'm trying to get the semantics of protected methods of C++. I have a
> class with a method that is not meaningful for the outside world, but
> different instances of this class should be able to invoke this method
> on one another.
>
> I need something like the following pseudocode:
>
> class a =
> object
>    method protected m = ...
>    method m2 (obj:a) = a # m
> end

Do not private Ocaml methods have in fact "protected" C++ semantics? They
cannot be called directly but can be used in methods of inherited
classes...

- Dmitry Bely


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners