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 444AB7EEFA for ; Tue, 10 Nov 2015 14:41:26 +0100 (CET) IronPort-PHdr: 9a23:qss9lx+e2xAiKv9uRHKM819IXTAuvvDOBiVQ1KB80+gcTK2v8tzYMVDF4r011RmSDdidt68P1rGempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lR8iO0o/qjKibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wyseTvvBjFBSWV52AXUi1Cmx5BAg6D4gv7RZzxmi/3putz2W+ROsigCfg/UDGmqqNqUwPAiSEdNjd//nuEpNZ3ifdhpxeopho36YfObIaIfK5keabUfNUyTnBQRtpWTCFHGY76ZIwKWblSdd1EppXw8gNd5SC1AhOhUaa2kmdF Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=romain@cryptosense.com; spf=None smtp.mailfrom=romain@cryptosense.com; spf=None smtp.helo=postmaster@1.mo1.mail-out.ovh.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of romain@cryptosense.com) identity=pra; client-ip=178.32.127.22; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="romain@cryptosense.com"; x-sender="romain@cryptosense.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of romain@cryptosense.com) identity=mailfrom; client-ip=178.32.127.22; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="romain@cryptosense.com"; x-sender="romain@cryptosense.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@1.mo1.mail-out.ovh.net) identity=helo; client-ip=178.32.127.22; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="romain@cryptosense.com"; x-sender="postmaster@1.mo1.mail-out.ovh.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ChAADh8kFWnBZ/ILJexTSDPYJTAgyBMDwQAQEBAQEBAQEQAQEBAQEGDQkJIS6CLoIIAQEEIxU6BhELGAICBRYLAgIJAwIBAgFFBgEMCAKILgGyFZBUAQEBBwIhgQGJKIEphUGCNIFEAQSWSI4Dm2g4glKBXoYfAQEB X-IPAS-Result: A0ChAADh8kFWnBZ/ILJexTSDPYJTAgyBMDwQAQEBAQEBAQEQAQEBAQEGDQkJIS6CLoIIAQEEIxU6BhELGAICBRYLAgIJAwIBAgFFBgEMCAKILgGyFZBUAQEBBwIhgQGJKIEphUGCNIFEAQSWSI4Dm2g4glKBXoYfAQEB X-IronPort-AV: E=Sophos;i="5.20,270,1444687200"; d="scan'208";a="186933718" Received: from 1.mo1.mail-out.ovh.net ([178.32.127.22]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 10 Nov 2015 14:41:25 +0100 Received: from mail183.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo1.mail-out.ovh.net (Postfix) with SMTP id 54FEC10700B3 for ; Tue, 10 Nov 2015 14:41:25 +0100 (CET) Received: from localhost (HELO queueout) (127.0.0.1) by localhost with SMTP; 10 Nov 2015 15:41:23 +0200 Received: from alille-655-1-132-116.w83-198.abo.wanadoo.fr (HELO ?192.168.1.15?) (romain@bardou.fr@83.198.207.116) by ns0.ovh.net with SMTP; 10 Nov 2015 15:41:20 +0200 To: Alain Frisch , caml-list@inria.fr References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E070@IRSMSX102.ger.corp.intel.com> <87pozk6vjp.fsf@mid.deneb.enyo.de> <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E747@IRSMSX102.ger.corp.intel.com> <56407297.2060309@frisch.fr> <564076EA.7020805@mpi-sws.org> <5640D8E0.6060102@lexifi.com> <5640E2EF.7070400@mpi-sws.org> <0F7D3B1B3C4B894D824F5B822E3E5A172CE3ED02@IRSMSX102.ger.corp.intel.com> <5641C62C.9000606@cryptosense.com> <5641CA8E.4060909@lexifi.com> <5641CD13.1080900@cryptosense.com> <5641EE81.2040409@lexifi.com> From: Romain Bardou Message-ID: <5641F3FF.2050308@cryptosense.com> Date: Tue, 10 Nov 2015 14:41:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.3.0 MIME-Version: 1.0 In-Reply-To: <5641EE81.2040409@lexifi.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 17582052947198669344 X-Ovh-Remote: 83.198.207.116 (alille-655-1-132-116.w83-198.abo.wanadoo.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekhedrgeehucetufdoteggodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekhedrgeehucetufdoteggodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-Validation-by: romain@cryptosense.com Subject: Re: [Caml-list] Newbie comment on constructor syntax On 10/11/2015 14:17, Alain Frisch wrote: > On 10/11/2015 11:55, Romain Bardou wrote: >> That #C would mean something different for the definitions is an issue >> with the syntax and the semantics of constructor definitions I believe, >> which is already rather confusing :) > > This confusion is precisely the one I'm trying to address with GPR#284. > At the expression and pattern level, things are pretty clear: > constructors take 0 or 1 argument. The only subtlety that remains is > with the type inclusion relation, but this is not at the expression > level. Let's not re-introduce more confusion by making it observable > again at the expression level whether the constructor was defined as "A > of (int * int)" or "A of int * int". I see: you do not just propose to have a way to extract a tuple from a multi-argument constructor. What you propose is to make all constructors have only 0 or 1 argument (which may be a tuple). Under the hood, the tuple case is flattened to avoid an allocation, but the programmer does not have to know anymore (unless he uses Obj I guess). That would be a great change I believe. -- Romain