From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 625997EEBF for ; Tue, 4 Aug 2015 11:26:50 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.17.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of goswin-v-b@web.de designates 212.227.17.11 as permitted sender) identity=mailfrom; client-ip=212.227.17.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.17.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D4AAD1hMBVnAsR49Rbg26/UYJHgzYCgTFMAQEBAQEBEgEBAQEBBg0JCSEuhCMBAQEDAScLAUsLCxgJJQ8FKIhMAQ0MxC8fhW8si0+FDxeDAYEUAQSUe4R9h1GBSUaGPwyNGYNkhCWDOQEBAQ X-IPAS-Result: A0D4AAD1hMBVnAsR49Rbg26/UYJHgzYCgTFMAQEBAQEBEgEBAQEBBg0JCSEuhCMBAQEDAScLAUsLCxgJJQ8FKIhMAQ0MxC8fhW8si0+FDxeDAYEUAQSUe4R9h1GBSUaGPwyNGYNkhCWDOQEBAQ X-IronPort-AV: E=Sophos;i="5.15,607,1432591200"; d="scan'208";a="141977269" Received: from mout.web.de ([212.227.17.11]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Aug 2015 11:26:35 +0200 Received: from frosties.localnet ([95.208.221.151]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0M0QgT-1YZGgo00z7-00uVjr for ; Tue, 04 Aug 2015 11:26:35 +0200 Received: from mrvn by frosties.localnet with local (Exim 4.84) (envelope-from ) id 1ZMYUU-0001yB-5A for caml-list@inria.fr; Tue, 04 Aug 2015 11:26:34 +0200 Date: Tue, 4 Aug 2015 11:26:34 +0200 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20150804092633.GC5689@frosties> References: <55BF6F1C.3050705@bioquant.uni-heidelberg.de> <55BF75F6.1040006@bioquant.uni-heidelberg.de> <8E1A640CE3374EB492981ADB0A2DA5C6@erratique.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8E1A640CE3374EB492981ADB0A2DA5C6@erratique.ch> User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:cVpUoZIYMYjq73MIh7MbrtaIwTTeuUHg0rr9/zRFIaRJ3iHzcNm cwAcBEXpRnu1o6Yt4vWrVkLl1GUKwBBS6nL5KBhkCwgXJniJgsQUxY7s2SS/SOe+O6x05OP 1gVhY8MVcHHOTSeLja2Yu/OD5xgwrpAsvYb9q3gBf6cEdi0DLYEw+2fPjT4IKzV2a1H5JGb Oyz++3tox9bPfjUf4SOIA== X-UI-Out-Filterresults: notjunk:1;V01:K0:uhzW+OOaEp4=:DhdlWfomqAjCVbJL7oHD8N cFZbU6hiRU5hk7LAKKH3iyp0O6JheFSfdUa0MxNDK7mF2C2cQrvCqS6mwfnTzZCD44zuysjgk ul7icgYkfL5oNT4qKR2ARnSL/UERO7OYOoSbBUo9j5L3NCBi4ocyj9F5PFlyUVhb7baa9pP2N w4Qv1fq9QBbPpn2V+RNrudYlMsdL/t0zq+LNUrXPUKVcsaCgWp1X8tw69iMjui2EyqtFT8OX0 HmqqtkFsoY48bwM3x9d0G+2UOzWxeIgdd+M68KdC/VUjOmDpEwiof/cGRiWHdbJNgztocbbz1 +AH8yM8rB3kEKQxK9E7ZwfIOOeVaEX395GTpmqN7sJEchPgW0DhjGbvLz04Ex3QYg9yV4baHb Rwo5be4636ma4RgfiP8IK6SNY3u35GDQdBFbQlWPZohBnQIHgx/++DyaFaSoR2NT/WnH3Du42 C3eWuUsoy20FnJvMqquwdKHjgGOQ0Dh53/ns+lnSp0HsrS5nZY1W02jJwOVSz+ByISQWNRhg4 qzNhy+pWAT0FCN2TpVyvAtCcIXE63gsH/9S2FiawYdhqgAmKezZZPbRzmd/I2jCWCmbKyghaq U/svZTexLbP8XsX/IxsUejSRd1oISxSo42prVvHC3QOxtZdsQJxHl+zyO8gOGfwFiFe3+4kRh 2t9vhDoCIq06Bz2rKFa4ueEBDxO055dIuKTrJbPxKlracuA== Subject: Re: [Caml-list] destructive local opens On Mon, Aug 03, 2015 at 03:24:18PM +0100, Daniel Bünzli wrote: > Le lundi, 3 août 2015 à 15:08, Nils Becker a écrit : > > 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 exact details but something similar): > > let ox = V2.((dot v ox) * ox) in > V2.(3 * ox + oy) What is wrong with that code? I'm assuming V2 has: val (+): t -> t -> t val (*): int -> t -> t val dot: t -> t -> int > The reality is that M.() is inherently dangerous, especially from an API evolution perspective where new identifiers with matching type may get introduced 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 more 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 library. > > Best, > > Daniel > > [1] http://erratique.ch/software/gg MfG Goswin