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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id C16317F02E for ; Mon, 17 Aug 2015 17:18:54 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.182 as permitted sender) identity=mailfrom; client-ip=209.85.223.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-io0-f182.google.com) identity=helo; client-ip=209.85.223.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-io0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BsAgDB+tFVm7bfVdFdgzo1aQaDHqoVhG2NRYV5AoEnB0wBAQEBAQESAQEBAQEGCwsJIS6EJAEBBBIRHQEbEgsBAwwGBQsNAgIJHQICIgERAQUBChIGExIQh3YBAxINrVeBLz4xi0CBbIJ5ilQKGScDCleFAAEBAQEBAQEDAQEBAQEXAQUOgRSKMIUJB4JpgUMFhWwMjyWFBIdoghCWSxIjgRcXhA48MwGCSwEBAQ X-IPAS-Result: A0BsAgDB+tFVm7bfVdFdgzo1aQaDHqoVhG2NRYV5AoEnB0wBAQEBAQESAQEBAQEGCwsJIS6EJAEBBBIRHQEbEgsBAwwGBQsNAgIJHQICIgERAQUBChIGExIQh3YBAxINrVeBLz4xi0CBbIJ5ilQKGScDCleFAAEBAQEBAQEDAQEBAQEXAQUOgRSKMIUJB4JpgUMFhWwMjyWFBIdoghCWSxIjgRcXhA48MwGCSwEBAQ X-IronPort-AV: E=Sophos;i="5.15,695,1432591200"; d="scan'208";a="173867115" Received: from mail-io0-f182.google.com ([209.85.223.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Aug 2015 17:18:54 +0200 Received: by iodv127 with SMTP id v127so139082336iod.3 for ; Mon, 17 Aug 2015 08:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=sThDMEJCfW+v1p8TYF0g+HnW+EASaoQWoD7EMaatbU4=; b=BY6q6BObSNeV4n9Mstab5oFnMQORBAbq1Lwz9kYSaqIXL9D1WB9nLkF/Qlqp9RKKJz 2XGp1hSleYkBYzB+Xk/tYmyiYhEAqz1H4KchTCIPB+Iy1o5fculuk32FJVH2Pa0M0foH 0ckF3YAmUQKRZujuldGCHNvgRw2Uzm9m8WUU+I3BeAj2beSLv1EKz9SIwOeSU3vDfOxG YdTXIAWI1KsNfkeR3DkawpUERZrOJGlzZzKgk46+DcvX6v2+XOf82809LWRjwwJlNAR4 lFexbNi+3iy+lwLLsk+I21nysRQZzpV+KNJiSbUSF2Fqe1XMCGtYaMrO25mp86hJQEuF psvA== X-Received: by 10.107.128.83 with SMTP id b80mr1888790iod.84.1439824733044; Mon, 17 Aug 2015 08:18:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.68.132 with HTTP; Mon, 17 Aug 2015 08:18:13 -0700 (PDT) In-Reply-To: <55D1F989.1040804@bioquant.uni-heidelberg.de> References: <55D1B49C.2040309@bioquant.uni-heidelberg.de> <55D1F989.1040804@bioquant.uni-heidelberg.de> From: Gabriel Scherer Date: Mon, 17 Aug 2015 17:18:13 +0200 Message-ID: To: Nils Becker Cc: caml users Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] destructive local opens Note that forcing you to use "let open! M" instead of M.!(...) is already a way to make you pay. On Mon, Aug 17, 2015 at 5:11 PM, Nils Becker wrote: > 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. > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs