From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA25289; Sun, 21 Jul 2002 00:55:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA25282 for ; Sun, 21 Jul 2002 00:55:21 +0200 (MET DST) Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6KMtGj15405 for ; Sun, 21 Jul 2002 00:55:19 +0200 (MET DST) Received: (from uucp@localhost) by relay.rinet.ru (8.11.6/8.11.6) with UUCP id g6KMtCT12638 for caml-list@inria.fr; Sun, 21 Jul 2002 02:55:12 +0400 (MSD) X-Envelope-To: caml-list@inria.fr Received: from dialin1.stormoff (ROVER1) [192.168.0.129] by stormoff with esmtp (Exim 3.12 #1 (Debian)) id 17W32C-0000Ef-00; Sun, 21 Jul 2002 02:49:09 +0400 X-Comment-To: Alessandro Baretta To: caml-list@inria.fr Subject: Re: [Caml-list] Protected methods References: <3D369B89.1030000@baretta.com> From: Dmitry Bely Date: Sun, 21 Jul 2002 02:48:58 +0400 In-Reply-To: <3D369B89.1030000@baretta.com> (Alessandro Baretta's message of "Thu, 18 Jul 2002 12:42:17 +0200") Message-ID: User-Agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.4 (Common Lisp (Windows [3]), i586-pc-win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Alessandro Baretta 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