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 349897EEBF for ; Mon, 17 Aug 2015 17:06:12 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of nils.becker@bioquant.uni-heidelberg.de) identity=pra; client-ip=129.206.100.212; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="nils.becker@bioquant.uni-heidelberg.de"; x-sender="nils.becker@bioquant.uni-heidelberg.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of nils.becker@bioquant.uni-heidelberg.de) identity=mailfrom; client-ip=129.206.100.212; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="nils.becker@bioquant.uni-heidelberg.de"; x-sender="nils.becker@bioquant.uni-heidelberg.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@relay.uni-heidelberg.de) identity=helo; client-ip=129.206.100.212; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="nils.becker@bioquant.uni-heidelberg.de"; x-sender="postmaster@relay.uni-heidelberg.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CbAQBK99FVnNRkzoFdh3y/aoJWAoEuTAEBAQEBARIBAQEBAQgLCQkhLoQkAQEEIw8BRRELGAICBRYLAgIJAwIBAgFFEwgBAYgqu0KVZCyBIoowhRAXglKBQwWVHZVWkT2EJYM7AQEB X-IPAS-Result: A0CbAQBK99FVnNRkzoFdh3y/aoJWAoEuTAEBAQEBARIBAQEBAQgLCQkhLoQkAQEEIw8BRRELGAICBRYLAgIJAwIBAgFFEwgBAYgqu0KVZCyBIoowhRAXglKBQwWVHZVWkT2EJYM7AQEB X-IronPort-AV: E=Sophos;i="5.15,695,1432591200"; d="scan'208";a="142983313" Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Aug 2015 17:06:07 +0200 Received: from ix.urz.uni-heidelberg.de (cyrus-portal01.urz.uni-heidelberg.de [129.206.100.176]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t7HF66hr002596 for ; Mon, 17 Aug 2015 17:06:06 +0200 Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (Postfix) with ESMTPS id 5859A21B634C for ; Mon, 17 Aug 2015 17:06:06 +0200 (CEST) Received: from bqdyn253_067.bioquant.uni-heidelberg.de (bqdyn253_067.bioquant.uni-heidelberg.de [129.206.253.147]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id t7HF6Ang008371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 17 Aug 2015 17:06:11 +0200 References: <55D1B49C.2040309@bioquant.uni-heidelberg.de> To: caml-list@inria.fr From: Nils Becker X-Enigmail-Draft-Status: N1110 Message-ID: <55D1F989.1040804@bioquant.uni-heidelberg.de> Date: Mon, 17 Aug 2015 17:11:05 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Validation-by: nils.becker@bioquant.uni-heidelberg.de Subject: Re: [Caml-list] destructive local opens On 17/08/15 16:26, Gabriel Scherer wrote: > both (let open!) > and M.!(...) are dangerous constructions that should be avoided > whenever possible, and that we could and should drastically reduce the > number of situations where the user is encouraged to use them. This may have been brought up before, but one way to discourage would be to make it very verbose. One would require both (let open!) or M.!() at the shadowing site and an extra annotation for each identifier or operator in M's signature that is supposed to shadow. The signature would then have to carry that information around. Then M.() would never shadow, M.!() indicates possibility of shadowing and by looking at the type of M one can see which of M's values are actually shadowing? A tool like merlin could then even annotate this graphically. but this may be too drastic a change... n.