From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr 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 1C3F9D55E for ; Wed, 27 Jul 2005 20:43:30 +0200 (CEST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6RIhSAQ028877 for ; Wed, 27 Jul 2005 20:43:29 +0200 Received: from rosella (ppp41-136.lns2.syd6.internode.on.net [59.167.41.136]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id j6RIgsoH048443; Thu, 28 Jul 2005 04:12:54 +0930 (CST) Subject: Re: [Caml-list] Some Clarifications From: skaller To: Robert Roessler Cc: Jon Harrop , caml-list@yquem.inria.fr In-Reply-To: <42E77634.6020904@rftp.com> References: <6C6555DF5D075A4EA6D27706F4EC5975031677D4@EUR-MSG-10.europe.corp.microsoft.com> <200507271158.09619.jon@ffconsultancy.com> <42E77634.6020904@rftp.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-VG4WWrBLddEG/ow9EiQG" Date: Thu, 28 Jul 2005 04:42:54 +1000 Message-Id: <1122489774.6768.197.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 X-Miltered: at concorde with ID 42E7D5D0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 gtk:01 ...:98 wrote:01 wrote:01 sourceforge:01 sourceforge:01 typing:01 typing:01 supported:01 functional:02 objects:02 objects:02 X-Attachments: type="application/pgp-signature" name="signature.asc" X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 --=-VG4WWrBLddEG/ow9EiQG Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2005-07-27 at 04:55 -0700, Robert Roessler wrote: > Jon Harrop wrote: > > In my code, I have used an object once, in order to circumvent a typing= =20 > > problem. I have never successfully used OO in OCaml. I have, and they worked quite well -- I was implementing Python in Ocaml .. the utility of Ocaml objects to represent Python objects is obvious :) > An object certainly seems a natural and concise way to represent a=20 > "state-holder-with-structured-access" - and I have done just that in a=20 > small OCaml project... but that could be the Smalltalk and C++ in my=20 > background talking. :) Generally (whatever that means) one will prefer functional techniques in Ocaml: not because they're better supported than Objects, but because transparency and persistence just make programming easier. However many applications have to implement protocols that require state to represent context, and others have to interface with foreign Object Oriented code (eg Gtk). In fact the big pain here is that Ocaml is strict about typing, and if you're modelling a system that isn't, it can be hard, simply because what you are required to implement is already flawed. --=20 John Skaller --=-VG4WWrBLddEG/ow9EiQG Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBC59WssRp8/9aGVGsRAmE/AJ9zXKivx/GgByUwveLsgIyI3+hGwACgkfaX epKDeSAonu9pw7xPSRNCRT0= =xIYf -----END PGP SIGNATURE----- --=-VG4WWrBLddEG/ow9EiQG--