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 p7SABubQ023631 for ; Sun, 28 Aug 2011 12:11:56 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApIBAPESWk7U4xEKk2dsb2JhbABChEyjKxQBAQEBCQkLCRQDIoFAAQEEASNWBQsLGAICJgICVwYTCYdpAgKlcpAvgSyED4ERBIwHjCaLeA X-IronPort-AV: E=Sophos;i="4.68,292,1312149600"; d="scan'208";a="106858631" Received: from moutng.kundenserver.de ([212.227.17.10]) by mail4-smtp-sop.national.inria.fr with ESMTP; 28 Aug 2011 12:11:50 +0200 Received: from office1.lan.sumadev.de (dslb-084-059-069-181.pools.arcor-ip.net [84.59.69.181]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MZUxJ-1QfGdg3mhx-00LByQ; Sun, 28 Aug 2011 12:11:38 +0200 Received: from [192.168.1.111] (546BF154.cm-12-4d.dynamic.ziggo.nl [84.107.241.84]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 738BDC00C7; Sun, 28 Aug 2011 12:11:37 +0200 (CEST) From: Gerd Stolpmann To: Andreas Rossberg Cc: Jeff Meister , david.baelde@ens-lyon.org, Chris Yocum , caml-list List In-Reply-To: <00776888-5A29-4575-BAAC-A27B3F2A8FE3@mpi-sws.org> References: <4E58CCC3.4040901@gmail.com> <1314457588.3496.86.camel@thinkpad> <1314473840.3496.132.camel@thinkpad> <1314486489.3496.179.camel@thinkpad> <00776888-5A29-4575-BAAC-A27B3F2A8FE3@mpi-sws.org> Content-Type: text/plain; charset="UTF-8" Date: Sun, 28 Aug 2011 12:11:36 +0200 Message-ID: <1314526296.3496.199.camel@thinkpad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:Js0GXoUTNwooj6iG3CW5JbupwCWvbXWiUbTcCti7Tzh ZiwIV/kUQk8kcWZIS01hNw/qeYhhbIB2aZgbM4SWqxp18qSqOM SxjNuPnRfJXzpcUtNb6WnDjToZruSUph0tNjPXdu5p/AW7Yndv cHJw5ykK0OMPe48/wBAYMGNR64J8SBpCj7K3z5sDxVYtZcCZis dxTV6PIl/cEjIlhjHXvAA== Subject: Re: [Caml-list] Ocaml and the Fragile Base Class Problem Am Sonntag, den 28.08.2011, 11:31 +0200 schrieb Andreas Rossberg: > 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. Who says that the state is or can be hidden? This is certainly a later addition to OO, when people found out that they can view a class as an abstract data type (with the known limitations). Take off your "typed glasses". OO is mainly a way of organizing the execution flow, and there are lots of OO languages lacking typing and access control. And even in OCaml you'd not use objects if your primary interest is encapsulation - objects are not good at this. (That's all what I'm saying!) Gerd > 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 > > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de *** Searching for new projects! Need consulting for system *** programming in Ocaml? Gerd Stolpmann can help you. ------------------------------------------------------------