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 9E1FC7EEBF for ; Wed, 19 Aug 2015 16:13:44 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=pra; client-ip=188.64.186.7; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=mailfrom; client-ip=188.64.186.7; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mx2.ukhost4u.com) identity=helo; client-ip=188.64.186.7; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="postmaster@mx2.ukhost4u.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ARAQDcjdRVnAe6QLxdg29pBr9FhXsCgT5MAQEBAQEBEgEBAQEBBg0JCSEuhCQBAQQ4QBELBxEJFg8JAwIBAgFFBgGIRAEI0GABAQgCAR+LU4URhCwBBIVsjziFBIg4e0aDZoJ4kUOEJHABgUeBBAEBAQ X-IPAS-Result: A0ARAQDcjdRVnAe6QLxdg29pBr9FhXsCgT5MAQEBAQEBEgEBAQEBBg0JCSEuhCQBAQQ4QBELBxEJFg8JAwIBAgFFBgGIRAEI0GABAQgCAR+LU4URhCwBBIVsjziFBIg4e0aDZoJ4kUOEJHABgUeBBAEBAQ X-IronPort-AV: E=Sophos;i="5.15,710,1432591200"; d="scan'208";a="143203899" Received: from mx2.ukhost4u.com ([188.64.186.7]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Aug 2015 16:13:43 +0200 Received: from bluechip4.ukhost4u.com ([188.64.184.40]) by mx2.ukhost4u.com with esmtps (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZS47W-0008EH-MA; Wed, 19 Aug 2015 15:13:41 +0100 Received: from [5.80.228.89] (port=60648 helo=[192.168.1.66]) by bluechip4.ukhost4u.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZS47U-003sgS-I9; Wed, 19 Aug 2015 15:13:38 +0100 Message-ID: <55D48F0E.4050604@coherentgraphics.co.uk> Date: Wed, 19 Aug 2015 15:13:34 +0100 From: John Whitington User-Agent: Postbox 4.0.3 (Macintosh/20150805) MIME-Version: 1.0 To: Oleg , gabriel.scherer@gmail.com, caml-list@inria.fr References: <20150819135526.GA2204@Magus.sf-private> In-Reply-To: <20150819135526.GA2204@Magus.sf-private> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-2.9 X-AuthUser: john@coherentgraphics.co.uk X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bluechip4.ukhost4u.com X-AntiAbuse: Original Domain - X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Get-Message-Sender-Via: bluechip4.ukhost4u.com: none X-Filter-ID: s0sct1PQhAABKnZB5plbIf846yA3iTMvdsVmSdrHPMU9CTo+a6AtXGOZ5s/KMzk3GXNQvgP2LFpq 9ASq+UttQZQ5xnY1VQyXuU/EAztX7s0E2JDkUWgwA5D19qPbMX2rm4e/qjizsP+emvrgA1P4/C3Y qbc2H12avbaeZVaraBNO7ERE/4+MUUk6DSOa1gUV/cwdQlE/2tf+B36DiSrs7Vv8A9w0xVpT663M Zh/Zja0+WL6wz3F3Rb6xN0cjxx4sU1w06Csj5fb/SPT3uK7Hmbo2vP/d7Q3LBDMhcFAhvdL+f3pc XUmlLYPX/BlNexTn31/E3ahF5MMcDI7KdpjQKYn+TjsxT0xl0Z6BI4jZKZ40dKFOE3BfZETw255u BppYzq4arHNUQXU3XeoWUjSjiUiZKMlJHa0G8m6m500XmsvSi6ks3URFa6XEgyscExiZ4ZJYQSUm j7aSm/mY7zv9ryyUEa5RvZy7X9HeQJbBihQPI5yIYX6ertfJ+XlA08ZZG24aoKLjaOZZDkt2ps4a agLV+gOokHWpbLeGAM6BHDPjmn9dRGYeFx1mT3zCDsqMOikwX49L5Im7kE81/5niz4PAgTtUp75u qlx0KezvZHUhM1AS/2VijxMbQQvUN2NfN2cjO02LjmNVuFSzDdNmIpcCP7IruH8C26mceNP9SM4t QGRhALV0IOwFH1WnciyUrTq1K3NO+kY9CwVl2zpMbYzudkCVDHST7Le9mqNwiKQxL7hrJSk60SF3 F6RYOYr2 X-Report-Abuse-To: spam@mx1.ukhost4u.com X-Filter-Fingerprint: IFrWXGses7OKB5S5G8/dJRn/7L7+nnclbWGk7OJ1jHJA3cTUQ1R++keuE7RDJ8Kg3RbMLUalw1oC mj99/u+PoqoVy8a3lsStJtAvpObFX0Wok1JBYnOLzfRIhlEHQynLUpndEJ0YoaLytXXo8BMTaVt0 ARHRi6XGuAluI1udprFy32DUYpEhA3j9NJFmItfypuoazoDH3m92PL21GfhFYWcYmGLKZUTyGy/B A6iJtsD8WFC+rpTT4JYvoDjVeZUw3fI9smEy0EupqfCN6sn6Zg== X-Originating-IP: 188.64.184.40 X-SpamExperts-Domain: bluechip4.ukhost4u.com X-SpamExperts-Username: 188.64.184.40 Authentication-Results: ukhost4u.com; auth=pass smtp.auth=188.64.184.40@bluechip4.ukhost4u.com X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.00) X-Recommended-Action: accept Subject: Re: [Caml-list] destructive local opens Hi, Oleg wrote: > [Since this discussion still continues, I think I will comment on > Gabriel's comment after all.] > > "It is remarkable that programming languages have avoided introducing > explicit weakening (the popping of a symbol out of scope) for now, and > I think it is a property that should be preserved. We're not yet ready > to go there." > > Actually there have been proposals to go into that direction, about 30 > years ago. > > http://research.microsoft.com/lampson/39-Pebble/39-PebbleAbstract.htm > > Please look at p 287 of the paper: ``Pebble also has an anti-LET, > which impoverishes the environment instead of enriching it.'' This is > exactly the issue under discussion in this thread. I've sometimes thought it would be nice to be able to write something like: let x = f a b c and y = g d e in let x' for x y = x * 2 + y in (x', h x') where "let x' for x y" introduces the binding of x' and takes x and y out of scope. Now, if we accidentally write... let x = f a b c and y = g d e in let x' for x, y = x * 2 + y in (x', h x) ...we would get an error, since x is out of scope on the last line. You could imagine also "let x' for _ = ... in ..." which removes all variables in the current scope used in the calculation of x' from scope, which could be determined syntactically. This seems draconian, though. John -- John Whitington Director, Coherent Graphics Ltd http://www.coherentpdf.com/