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 7406F7EEBF for ; Mon, 3 Aug 2015 15:43:33 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of refis.thomas@gmail.com) identity=pra; client-ip=209.85.212.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="refis.thomas@gmail.com"; x-sender="refis.thomas@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of refis.thomas@gmail.com designates 209.85.212.182 as permitted sender) identity=mailfrom; client-ip=209.85.212.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="refis.thomas@gmail.com"; x-sender="refis.thomas@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-wi0-f182.google.com) identity=helo; client-ip=209.85.212.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="refis.thomas@gmail.com"; x-sender="postmaster@mail-wi0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BwAQDQbr9VlLbUVdFbGQEBAYMdNWkGgx2pN4RdjSeHHgdMAQEBAQEBEgEBAQEHCwsJHzCEJAEBAQMSER0BGxILAQMMAQUFCw8CCR0CAiIBEQEFAQoSBhMSEId2AQMSDaZ1gS4+MYs/gWyCeYp0ChknAwpXhFoBJQEFDoEUgzeGdod4gUMFhWYMjweEe4dRgg2VbxIjgRcXSYNEPTEBgksBAQE X-IPAS-Result: A0BwAQDQbr9VlLbUVdFbGQEBAYMdNWkGgx2pN4RdjSeHHgdMAQEBAQEBEgEBAQEHCwsJHzCEJAEBAQMSER0BGxILAQMMAQUFCw8CCR0CAiIBEQEFAQoSBhMSEId2AQMSDaZ1gS4+MYs/gWyCeYp0ChknAwpXhFoBJQEFDoEUgzeGdod4gUMFhWYMjweEe4dRgg2VbxIjgRcXSYNEPTEBgksBAQE X-IronPort-AV: E=Sophos;i="5.15,601,1432591200"; d="scan'208";a="172524506" Received: from mail-wi0-f182.google.com ([209.85.212.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 03 Aug 2015 15:43:33 +0200 Received: by wibxm9 with SMTP id xm9so115055697wib.1 for ; Mon, 03 Aug 2015 06:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=puzZI6GM/t0DMB6rSXHZvH+ADH7nFqimD/KDI59DlkE=; b=cnIFU2RfFdGTFI4XgiXIXyDvL8X2d6+f3K3Z/Wl6OE/c++GwgYG9DNQ5un8QC5CX0r PKYnl/SAjzsMUQW2IXkUcQj76zWUxMt8Ximrnx/XcadSf+FBl285rc+qeEuTZ8i7tHw1 DHK7ln0em0jzl19Wx/nekTXp35k3EhdiwKI3W6GU5oTMbPyq42jAmg4XhgeXFHS7d5Fb 5swRaCR+EVQjx58XkIVo/mtZW5/dGRkRChPhboWPGc44e/CArsPTdLMmd3+mbOCTq4Wr rprVh0MKO41+3DJIlg3XvEScFwm7psPJ/kRgXBdeszqa8QI4lcY3nYxUl1mDInM7WYAF 1DbA== MIME-Version: 1.0 X-Received: by 10.180.104.167 with SMTP id gf7mr33337005wib.86.1438609412800; Mon, 03 Aug 2015 06:43:32 -0700 (PDT) Sender: refis.thomas@gmail.com Received: by 10.27.176.228 with HTTP; Mon, 3 Aug 2015 06:43:32 -0700 (PDT) In-Reply-To: <55BF6F1C.3050705@bioquant.uni-heidelberg.de> References: <55BF6F1C.3050705@bioquant.uni-heidelberg.de> Date: Mon, 3 Aug 2015 14:43:32 +0100 X-Google-Sender-Auth: zkVKjpf5bxstkC_PvROy1wzCM5o Message-ID: From: Thomas Refis To: Nils Becker Cc: caml users Content-Type: text/plain; charset=UTF-8 X-Validation-by: thomas.refis@gmail.com Subject: Re: [Caml-list] destructive local opens https://github.com/ocaml/ocaml/pull/218 2015-08-03 14:39 GMT+01:00 Nils Becker : > Hi, > > this is a small syntax suggestion which I thought I should share; > apologies if this is nonsense or has been already decided against. > > Currently we have > > let open! M in > ... > > to indicate that we do intend to shadow definitions in the current scope > by those in M. This avoids getting warning 44 on compilation. I find > that quite useful. > > Would it be a good idea to have the same thing > for local opens with the dot syntax? M.(...) produces warning 44 > currently, but a proposed new syntax > > M.!(...) > or > M!(...) > > or something of the kind would suppress it. Obviously it should not > interfere with references. > > I came across this wish after defining a small Vector module which > overrides (+) to mean vector addition. Then formulas are conveniently > written M.(v + w) but that means I get 44. Of course I could define (+|) > instead but why not make use of namespaces if we can. > > -- > 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