From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 42DF37FAF6 for ; Mon, 1 Dec 2014 11:09:36 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=pra; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=mailfrom; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mx20.yaziba.net) identity=helo; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="postmaster@mx20.yaziba.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtQBAAk+fFRV6cyknGdsb2JhbABbzkyDEgKBExYBAQEBAREBAQEBAQgLCQkULoQDAQEEOEABEAsOCgkWDwkDAgECAUUGAQwBBwEBiEDSYwEBAQEBBQEBAQEBARyQSDMHhEgBBJxHh1KRbSWDEAEBAQ X-IPAS-Result: AtQBAAk+fFRV6cyknGdsb2JhbABbzkyDEgKBExYBAQEBAREBAQEBAQgLCQkULoQDAQEEOEABEAsOCgkWDwkDAgECAUUGAQwBBwEBiEDSYwEBAQEBBQEBAQEBARyQSDMHhEgBBJxHh1KRbSWDEAEBAQ X-IronPort-AV: E=Sophos;i="5.07,493,1413237600"; d="scan'208";a="91193128" Received: from mx20.yaziba.net ([85.233.204.164]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 01 Dec 2014 11:11:07 +0100 Received: from mta10.int.yaziba.net (unknown [10.4.20.30]) by mx20.yaziba.net (mx10.yaziba.net) with ESMTP id E998E1A73EC; Mon, 1 Dec 2014 11:09:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 0AD82CA684; Mon, 1 Dec 2014 11:09:14 +0100 (CET) X-Virus-Scanned: amavisd-new at mta10.int.yaziba.net Received: from mta10.int.yaziba.net ([127.0.0.1]) by localhost (mta10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vio9wT_3-Yz1; Mon, 1 Dec 2014 11:09:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id C44BCCA72A; Mon, 1 Dec 2014 11:09:13 +0100 (CET) X-Virus-Scanned: amavisd-new at mta10.int.yaziba.net Received: from mta10.int.yaziba.net ([127.0.0.1]) by localhost (mta10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2RnXY8IVcmlJ; Mon, 1 Dec 2014 11:09:13 +0100 (CET) Received: from [192.168.1.133] (APuteaux-553-1-101-92.w92-151.abo.wanadoo.fr [92.151.52.92]) by mta10.int.yaziba.net (Postfix) with ESMTPSA id 751C5CA684; Mon, 1 Dec 2014 11:09:13 +0100 (CET) Message-ID: <547C3E49.7030809@frisch.fr> Date: Mon, 01 Dec 2014 11:09:13 +0100 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Gerd Stolpmann , Jordan W CC: caml-list@inria.fr References: <1417362565.6436.88.camel@e130.lan.sumadev.de> In-Reply-To: <1417362565.6436.88.camel@e130.lan.sumadev.de> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-DRWEB-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrfeejiedrtdekgddthecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkfffhfgggvffufhgjtgfgsehtjegrtddtfeelnecuhfhrohhmpeetlhgrihhnucfhrhhishgthhcuoegrlhgrihhnsehfrhhishgthhdrfhhrqe X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] Object Features On 11/30/2014 04:49 PM, Gerd Stolpmann wrote: > What could in deed be useful is a more light-weight construction that > layers objects, i.e. you define a new object around an existing one: Indeed, being able to define an object by extending an existing one would be quite useful (perhaps overriding some methods, being understood that this doesn't affect late-bound calls from that object to itself). I'd rather see that as a new kind of class expressions, say "of object ", where could be an object expression (with a fixed type) so that you could write: let new_object old_object = object inherit of object (old_object : t) method foo = ... method! bar = ... end This would also allow to merge two existing objects into one. If has type < m1:t1; ...; mn: tn >, "of object " would be equivalent to let o = in object method m1 = o # m1 ... method mn = o # mn end -- Alain