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 4A1527FB32 for ; Mon, 8 Dec 2014 10:35:35 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.17.12; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of goswin-v-b@web.de designates 212.227.17.12 as permitted sender) identity=mailfrom; client-ip=212.227.17.12; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.17.12; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AskEAJNwhVTU4xEMnGdsb2JhbABahDDHQYRwAoElFgEBAQEBEQEBAQEBBg0JCRQuhAMBAQQ6TwsYCSUPBQ0bNIglAQMSBM4PHysNhXUBCwEfjiKCNBaDC4EVBZd2gWiGYQyGQooBboJDAQEB X-IPAS-Result: AskEAJNwhVTU4xEMnGdsb2JhbABahDDHQYRwAoElFgEBAQEBEQEBAQEBBg0JCRQuhAMBAQQ6TwsYCSUPBQ0bNIglAQMSBM4PHysNhXUBCwEfjiKCNBaDC4EVBZd2gWiGYQyGQooBboJDAQEB X-IronPort-AV: E=Sophos;i="5.07,537,1413237600"; d="scan'208";a="92342166" Received: from mout.web.de ([212.227.17.12]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Dec 2014 10:35:34 +0100 Received: from frosties.localnet ([134.3.241.185]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LhNs4-1Xc06W2LUe-00mb6A for ; Mon, 08 Dec 2014 10:35:32 +0100 Received: from mrvn by frosties.localnet with local (Exim 4.82) (envelope-from ) id 1Xxuj6-0006oJ-0t for caml-list@inria.fr; Mon, 08 Dec 2014 10:35:32 +0100 Date: Mon, 8 Dec 2014 10:35:31 +0100 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20141208093531.GB25411@frosties> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:0mTTVMX6nywGC9r7LS4gqJR9la6lVv/wJsdWZhrBvGOM3eSnkjF TvjPT0AWwMIjVCAtE/Ti2dCpol8fAc3SnEUo4uVi7SneuqIzE2rS2kFp+jHSsFb45OkIq1C 2GPGsoEPJdnboA+I6ical2MbeGBeLhy0HkzMGohYPPLRABfVQd9w69Bc1I1A2bR6/5oo52j fo1rLf3X9DUHBkiTUR7gQ== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] Object Features On Mon, Dec 01, 2014 at 09:49:32AM +0000, Jeremy Yallop wrote: > On 30 November 2014 at 04:24, Jordan W wrote: > > I understand that object punning on "functional updates" to objects was > > recently added to trunk. This is a nice consistency, but I haven't found a > > way to perform object punning on methods or values for object *expressions*. > > > > let x = 10 > > let y = 20 > > let o = object > > method x > > method y > > end > > I wonder how far it's wise to take this idea. It would be possible to > extend the approach to a lot of places where it's currently necessary > to write 'x = x'. For example, we could extend module-level bindings > similarly: > > module (F : sig > val x : int > val y : int > end) = > struct > open F > let x > let y > end struct include F end MfG Goswin