From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7S9VmIL022514 for ; Sun, 28 Aug 2011 11:31:48 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgABAIoJWk6LEwExe2dsb2JhbABCqA8BARYmBSCBQAEBAQEDOAIGAQE3AQ8LDgouVwaIB6gLAY0TBYVsYKQp X-IronPort-AV: E=Sophos;i="4.68,292,1312149600"; d="scan'208";a="106857131" Received: from infao0809.mpi-sb.mpg.de (HELO hera.mpi-sb.mpg.de) ([139.19.1.49]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 28 Aug 2011 11:31:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mpi-sb.mpg.de; s=mail200803; h=From:To:In-Reply-To:Subject: References:Message-Id:Content-Type:Content-Transfer-Encoding: Mime-Version:Date:Cc; bh=MliMt2hVXF35AOhZqEO6ML2OAggi6h+DybhesYZ v/rQ=; b=Zsc7HEenKHbPUkdCDcibKVHB9iJhs4+AhEMarkVhqv6WHguF+p8kUAI F9u0BJqFTxQAlbwr6PJ9npe+XbdQan44a/2tKtD1co+IVSmRZ93sTx72FCGqM/9G ebca4mQoip22yKrLYRcSlJetCBe4c9/dCaFgUeoK6FJDl2B1q1dk= Received: from maniac.mpi-klsb.mpg.de ([139.19.1.26]:60931) by hera.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.69) id 1QxbiL-0002Qi-Vn; Sun, 28 Aug 2011 11:31:39 +0200 Received: from mnch-4d0474cc.pool.mediaways.net ([77.4.116.204]:57288 helo=[192.168.178.31]) by maniac.mpi-klsb.mpg.de (envelope-from ) with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) id 1QxbiL-0007sR-98; Sun, 28 Aug 2011 11:31:37 +0200 From: Andreas Rossberg To: Gerd Stolpmann In-Reply-To: <1314486489.3496.179.camel@thinkpad> References: <4E58CCC3.4040901@gmail.com> <1314457588.3496.86.camel@thinkpad> <1314473840.3496.132.camel@thinkpad> <1314486489.3496.179.camel@thinkpad> Message-Id: <00776888-5A29-4575-BAAC-A27B3F2A8FE3@mpi-sws.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 28 Aug 2011 11:31:35 +0200 Cc: Jeff Meister , david.baelde@ens-lyon.org, Chris Yocum , caml-list List X-Mailer: Apple Mail (2.936) Subject: Re: [Caml-list] Ocaml and the Fragile Base Class Problem On Aug 28, 2011, at 01.08 h, Gerd Stolpmann wrote: > > Let me point out one final thing. Information hiding is simply not a > core concept of OO - which is in the first place a specific way of > structuring the program (e.g. group data and algorithms together), > with > an integrated method of adapting object types (subtyping), and giving > control of parts of your algorithm to the user of your class. Not sure why you would say that. I'd argue that information hiding ("encapsulation") definitively is very central to OO -- an object collects a set of methods that operate on some hidden shared state (not necessarily mutable). And Ocaml fully supports that. What is not at the core of OO is the kind of ad-hoc softening of full encapsulation introduced by access modes like "protected" or "friend". And for better or worse, that's what Ocaml does not support directly -- everything is either public or (instance) private, unless you encode more sophisticated policies through the module system. /Andreas