From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A9CA8BC84 for ; Tue, 22 Mar 2005 20:18:35 +0100 (CET) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2MJIZJD018826 for ; Tue, 22 Mar 2005 20:18:35 +0100 Received: from [192.168.0.60] (lns-vlq-38-lyo-82-251-160-48.adsl.proxad.net [82.251.160.48]) by postfix4-2.free.fr (Postfix) with ESMTP id 26F922EC662 for ; Tue, 22 Mar 2005 20:18:35 +0100 (CET) Date: Tue, 22 Mar 2005 20:18:06 +0100 (CET) From: Marc Herbert X-X-Sender: mherbert@fcat To: caml-list@yquem.inria.fr Subject: extending a functional updater implicitly publicizes sub-updater method? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde with ID 42406F8B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; implicitly:01 coe:01 sml:01 implicitly:01 ocaml:01 htmlman:01 superclass:01 val:01 val:01 srv:98 ...:98 ...:98 inherit:01 constructor:01 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: [This is a shameless repost of http://groups.google.com/groups?selm=d1coe3%242l%241%40wolfberry.srv.cs.cmu.edu Looks like comp.lang.ml is more comp.lang.sml than comp.lang.caml...] I don't understand why my private subupdater is "made public implicitly" Example inspired from http://caml.inria.fr/ocaml/htmlman/manual005.html#ss:functional-objects This sample code is quite similar to extending the constructor of a superclass. class functional_point = object val x = 0 method private forward = {< x = x + 1 >} end;; class functional_color_point = object inherit functional_point as super val color = 0 (* color_forward is made implicitly public ?!? *) method private color_forward = {< color = color + 1 >} method private forward = super#forward#color_forward end;; Same issue when "forward" method is not private. I suspect there is some type issue here... could someone explain this? Thanks in advance.