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 p7RAsEhY028542 for ; Sat, 27 Aug 2011 12:54:14 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIBAPbLWE5KfVI0kGdsb2JhbABCmQ+PEggUAQEBAQkJDQcUBCGBWQIsARscAgMSEBYWGAMCAQIBEREBBQEvCAEBHodSAplDglUKjDuCVYRgO4htAgMGhkYEjhWFCoUOgSiGKzyDaA X-IronPort-AV: E=Sophos;i="4.68,289,1312149600"; d="asc'?scan'208";a="106812181" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Aug 2011 12:54:09 +0200 Received: by wwe6 with SMTP id 6so5328857wwe.9 for ; Sat, 27 Aug 2011 03:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; bh=dd5aogEUdcmRBzc4Ar7hxERVNkJulbiREGuZNiifQdk=; b=jYhkgMYciRHrGU3mGciSU/1sMxwzX0Md/1mZxpwEDzZunstrjs5tmy6StleEKAXvSF 9ocfF5uyw5pYIEKq/7eJit7F4f4W4BvZ/SKE2pSkr1BXLRZKzA1+O/MObEDoNqQttO5a au2x6y092j3wfoVB1t9yjZjYShqV7gSbPAXNo= Received: by 10.227.91.153 with SMTP id n25mr1833810wbm.113.1314442448863; Sat, 27 Aug 2011 03:54:08 -0700 (PDT) Received: from [192.168.42.49] ([82.132.243.27]) by mx.google.com with ESMTPS id fh17sm2020096wbb.54.2011.08.27.03.54.06 (version=SSLv3 cipher=OTHER); Sat, 27 Aug 2011 03:54:08 -0700 (PDT) Message-ID: <4E58CCC3.4040901@gmail.com> Date: Sat, 27 Aug 2011 11:53:55 +0100 From: Chris Yocum User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110805 Lightning/1.0b2 Thunderbird/3.1.12 MIME-Version: 1.0 To: caml-list@inria.fr X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig27458AF940DD7AE4DA46913E" Subject: [Caml-list] Ocaml and the Fragile Base Class Problem This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig27458AF940DD7AE4DA46913E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, A friend of mine is giving a talk about "monkey patching" entitled "Monkey patching, subclassing, and accidental overriding" (http://aaroncrane.co.uk/talks/monkey_patching_subclassing/paper.html). I was wondering how Ocaml deals with this situation or if it is even a problem at all in Ocaml? I mocked up some code: class base =3D object method meth x =3D print_endline "base"; print_endline (string_of_int x) end class deriv =3D object inherit base method meth x =3D print_endline "deriv"; print_endline (string_of_int x) end which kind of(?) shows the problem in Ocaml. He suggests in his paper that using a Meta-Object Protocol is the way around this. What do you think? Thanks, Chris Yocum --------------enig27458AF940DD7AE4DA46913E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREIAAYFAk5YzMoACgkQDjE+CSbP7HqFVgEAjKrHNqnv1qJcAQkNLLG9QJDg an8Gm0Goh2uJrIWAjHwA/0DK/kaQcDfLHW+lS5rnRxKmL/AilT7KjfH3w33N5QUp =M1yX -----END PGP SIGNATURE----- --------------enig27458AF940DD7AE4DA46913E--