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 130BA7FDE1 for ; Wed, 27 Jul 2016 10:07:45 +0200 (CEST) IronPort-PHdr: 9a23:2uq/vROh+GbTcPoD9sQl6mtUPXoX/o7sNwtQ0KIMzox0KPT4rarrMEGX3/hxlliBBdydsKMczbSK+Pm5ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd+KyZrrnLnro9X6WEZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wyseLivwPCQA/H3XAcX38biFIcDAHP9hD3WtHquSv3rOdn8CafNMzyC7szXGLxwb1sTUrBjC4GMXYX6mDMgcw42KtfqROn4RJlwpXfYKmROep/cKKbdtQfEzkSFv1NXjBMV9vvJ7AECPAMaKMB99Hw Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=alain.frisch@lexifi.com; spf=None smtp.mailfrom=alain.frisch@lexifi.com; spf=None smtp.helo=postmaster@mx20.yaziba.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=pra; client-ip=85.233.204.164; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=mailfrom; client-ip=85.233.204.164; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mx20.yaziba.net) identity=helo; client-ip=85.233.204.164; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="postmaster@mx20.yaziba.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0C0AgDdaphXh6TM6VVEGoQVKlIBunkkhXkCgS48EAEBAQEBAQEBEQEBAQoLCQkZL4IyBAESAYITAQUjBBFBEAsYAgImAgJXBg0IAQGIMQotrFaNXwEBAQEGAQEBASOBAYUpgXiCVYdBgloFjhWLHIFghDiIZII6hxqFa4c3hHaDdgI1gkCBWWwBiEABAQE X-IPAS-Result: A0C0AgDdaphXh6TM6VVEGoQVKlIBunkkhXkCgS48EAEBAQEBAQEBEQEBAQoLCQkZL4IyBAESAYITAQUjBBFBEAsYAgImAgJXBg0IAQGIMQotrFaNXwEBAQEGAQEBASOBAYUpgXiCVYdBgloFjhWLHIFghDiIZII6hxqFa4c3hHaDdgI1gkCBWWwBiEABAQE X-IronPort-AV: E=Sophos;i="5.28,428,1464645600"; d="scan'208";a="228091365" Received: from mx20.yaziba.net ([85.233.204.164]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Jul 2016 10:07:44 +0200 Received: from mta10.int.yaziba.net (mta10.int.yaziba.net [10.4.20.30]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx20.yaziba.net (mx10.yaziba.net) with ESMTPS id D12161A8121; Wed, 27 Jul 2016 10:07:43 +0200 (CEST) Received: from mta10.int.yaziba.net (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTPS id E558ACA779; Wed, 27 Jul 2016 10:07:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id D4DC1CA778; Wed, 27 Jul 2016 10:07:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at mta10.int.yaziba.net Received: from mta10.int.yaziba.net ([127.0.0.1]) by localhost (mta10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QqtHLcC4U7DB; Wed, 27 Jul 2016 10:07:43 +0200 (CEST) Received: from [10.0.210.146] (unknown [185.23.92.144]) by mta10.int.yaziba.net (Postfix) with ESMTPSA id A940CCA74A; Wed, 27 Jul 2016 10:07:43 +0200 (CEST) To: Gabriel Scherer References: <64e8e1be-7081-d683-e777-6f377968f36c@gmail.com> <07e4f1d2-f61f-4047-b1a0-7339b78825e3@lexifi.com> <1469525797.2529112.676963937.25E14FD6@webmail.messagingengine.com> <14e4dd61-7ff6-fdef-c103-a33c4f728bd9@lexifi.com> Cc: Leo White , caml users From: Alain Frisch Message-ID: Date: Wed, 27 Jul 2016 10:07:40 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-DRWEB-SCAN: ok X-VRSPAM-SCORE: -100 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrfeeltddrieeggdduudehucetufdoteggodetrfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdgjtegkkfeuteenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptehlrghinhcuhfhrihhstghhuceorghlrghinhdrfhhrihhstghhsehlvgigihhfihdrtghomheqnecuffhomhgrihhnpehinhhrihgrrdhfrhenucfkphepudekhedrvdefrdelvddrudeggeenucfrrghrrghmpehmohguvgepshhmthhpohhuth X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] exception Foo = Bar.Baz On 26/07/2016 18:32, Gabriel Scherer wrote: > I would see some use in being able to rename variant constructors, see > > MPR#7102: Ability to re-export a variant definition with renamed constructors? > http://caml.inria.fr/mantis/view.php?id=7102 The fact that an expression "A = B" can evaluate to true can be confusing and really change the interpretation of constructors as atoms. It's already the case for exceptions/extension constructors, but I'd prefer to have less of it than more. Thinking more about it, even for exceptions, not allowing different name for the same constructor could be useful to optimize cases such as: try try .... raise A ... with B -> ... with A -> .... If the compiler could assume that A and B were different constructors, it could compile the "raise" to a static jump to the handler for A, removing two dynamic comparisons with exception slots (and their associated memory accesses). Alain