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 C47397EEBF for ; Mon, 3 Aug 2015 16:38:08 +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.213.175; 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.213.175 as permitted sender) identity=mailfrom; client-ip=209.85.213.175; 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-ig0-f175.google.com) identity=helo; client-ip=209.85.213.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ig0-f175.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BeAQB9e79Vm6/VVdFbGQEBAYMdNWkGgx2pN4RdjSeCQ4M2AoEjB0wBAQEBAQESAQEBAQEGCwsJIS6EJAEBAQMSER0BGxILAQMMBgULDQICCR0CAiIBEQEFAQoSBhMSEId2AQMSDacHgS4+MYs/gWyCeYp7ChknAwpXhD4BAQEBBgEBAQEYAQUOgRSKLYRVMweCaYFDBYVmDI8HhHuHUYFHRoZujGmCGBIjgRcXhA48MYJMAQEB X-IPAS-Result: A0BeAQB9e79Vm6/VVdFbGQEBAYMdNWkGgx2pN4RdjSeCQ4M2AoEjB0wBAQEBAQESAQEBAQEGCwsJIS6EJAEBAQMSER0BGxILAQMMBgULDQICCR0CAiIBEQEFAQoSBhMSEId2AQMSDacHgS4+MYs/gWyCeYp7ChknAwpXhD4BAQEBBgEBAQEYAQUOgRSKLYRVMweCaYFDBYVmDI8HhHuHUYFHRoZujGmCGBIjgRcXhA48MYJMAQEB X-IronPort-AV: E=Sophos;i="5.15,602,1432591200"; d="scan'208";a="172530856" Received: from mail-ig0-f175.google.com ([209.85.213.175]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 03 Aug 2015 16:38:08 +0200 Received: by igbpg9 with SMTP id pg9so73165322igb.0 for ; Mon, 03 Aug 2015 07:38:06 -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:content-transfer-encoding; bh=XbXlwti6Z6b+PyywTev6TE1wiVfC3bko91LsmRCyBgw=; b=Ib9qq4WyXdbsHvkNYWJ51E2Erx5um3Q85O6pHCNVqFEc1LoGKTlQcZcxILUo6VWdoG UiD2V/PTp8gm4XSZLim+dQdyNhHmXFf3B5aBi9hlYD23jvzeZUOi7Yebh2YCf48+vEXs HqN3jtfAywBIaeF1sYx5fxzr+e8ToMhnhkqBTGwhTndr3qK9LnH+7hfZKRnyerjChU4K wjmBp41wtP/6OguZxsfcnkmFCDw8uuDHwGTs3jzE5iJCeoEyaSXnK9FiKae+Y+Jeh6zV CInQNIULU1lCE4YpGhomZhizcmW+P9mRqcltJJ6JYRhqREZjzsLT9eObR/m83kjnJq8j xHbA== X-Received: by 10.50.128.169 with SMTP id np9mr22431850igb.37.1438612686674; Mon, 03 Aug 2015 07:38:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.68.132 with HTTP; Mon, 3 Aug 2015 07:37:27 -0700 (PDT) In-Reply-To: <8E1A640CE3374EB492981ADB0A2DA5C6@erratique.ch> References: <55BF6F1C.3050705@bioquant.uni-heidelberg.de> <55BF75F6.1040006@bioquant.uni-heidelberg.de> <8E1A640CE3374EB492981ADB0A2DA5C6@erratique.ch> From: Gabriel Scherer Date: Mon, 3 Aug 2015 16:37:27 +0200 Message-ID: To: =?UTF-8?Q?Daniel_B=C3=BCnzli?= Cc: Nils Becker , Caml-list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] destructive local opens We could split 44 in two warnings, one (52 ?) for alphanumeric identifiers and the other (53 ?) for symbol identifiers (infix and prefix operations, but also now the indexed read and write syntax), and enable 52 by default. The more paranoid people may then enable 53 explicitly (and those that enable 44 explicitly today would retain the current behavior). On Mon, Aug 3, 2015 at 4:24 PM, Daniel B=C3=BCnzli wrote: > Le lundi, 3 ao=C3=BBt 2015 =C3=A0 15:08, Nils Becker a =C3=A9crit : >> It's possible that people actually want M.() to mean let open! more >> often than let open. For me I think that's the case. > > If you are in the vector case, I don't think that's the case. With Gg [1]= I often had the following kind of subtly wrong code (can't remember the ex= act details but something similar): > > let ox =3D V2.((dot v ox) * ox) in > V2.(3 * ox + oy) > > The reality is that M.() is inherently dangerous, especially from an API = evolution perspective where new identifiers with matching type may get intr= oduced later leading to silent semantic changes in your code. So we should = not encourage people to use M.!() as it's going to make the problem even mo= re acute. Besides we should have that 44 warning by default so that we see = the problems, but for now it's impossible to live with 44 and a Gg like lib= rary. > > Best, > > Daniel > > [1] http://erratique.ch/software/gg > > > > -- > 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