From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 690F37FD27 for ; Tue, 10 Nov 2015 15:01:02 +0100 (CET) IronPort-PHdr: 9a23:zod78BEn9eFRSJsFpEW6+J1GYnF86YWxBRYc798ds5kLTJ74p86wAkXT6L1XgUPTWs2DsrQf27eQ7/2rBDJIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbuptaOPU1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGDGI43IdVC08mwBEBBWNuAv9W57wtAPxrPtlxC6BMMvtQPY/XjH0q+9gQRrszSMGLCIR8WfNi8U2grgIjgimoklWx4fVZsm7LvtldaOVKdoeTGtHGMhLVjdKAqu4YpsOAetHNuFd+dqu72ASpAezUFH/TNjkzSVF0zqvhfU3 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@mx30.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=82.138.71.21; 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=82.138.71.21; 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@mx30.yaziba.net) identity=helo; client-ip=82.138.71.21; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="postmaster@mx30.yaziba.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ChAACC90FWnBVHilJexTSDPYJTAoE+OxEBAQEBAQEBARABAQEBAQgLCQkhLoIuggcBAQEDASMVQAYLCxgCAgUWCwICCQMCAQIBRQYBDAgBAYgiDLIakFABAQgCASCBAYVThH6HdYFEBZJng2GIDYUZiR2TJgI3glOBXoYfAQEB X-IPAS-Result: A0ChAACC90FWnBVHilJexTSDPYJTAoE+OxEBAQEBAQEBARABAQEBAQgLCQkhLoIuggcBAQEDASMVQAYLCxgCAgUWCwICCQMCAQIBRQYBDAgBAYgiDLIakFABAQgCASCBAYVThH6HdYFEBZJng2GIDYUZiR2TJgI3glOBXoYfAQEB X-IronPort-AV: E=Sophos;i="5.20,270,1444687200"; d="scan'208";a="186937911" Received: from mx30.yaziba.net ([82.138.71.21]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 10 Nov 2015 15:01:02 +0100 Received: from mta10.int.yaziba.net (unknown [217.117.151.14]) by mx30.yaziba.net (mx10.yaziba.net) with ESMTP id 4AE3F1A7600; Tue, 10 Nov 2015 15:01:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 7BA55CA658; Tue, 10 Nov 2015 15:01:01 +0100 (CET) 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 10024) with ESMTP id GDdiluK_Zeep; Tue, 10 Nov 2015 15:01:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 55EA1CAD1C; Tue, 10 Nov 2015 15:01:01 +0100 (CET) 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 bdcuZpi3gfD1; Tue, 10 Nov 2015 15:01:01 +0100 (CET) Received: from [10.0.210.141] (unknown [185.23.92.144]) by mta10.int.yaziba.net (Postfix) with ESMTPSA id 29D4FCA658; Tue, 10 Nov 2015 15:01:01 +0100 (CET) To: Romain Bardou , 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> <5641F3FF.2050308@cryptosense.com> From: Alain Frisch Message-ID: <5641F89C.7060408@lexifi.com> Date: Tue, 10 Nov 2015 15:01:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5641F3FF.2050308@cryptosense.com> 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: gggruggvucftvghtrhhoucdtuddrfeekhedrfeelgdehkecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpjgetkgfkueetnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjegrtddtfeejnecuhfhrohhmpeetlhgrihhnucfhrhhishgthhcuoegrlhgrihhnrdhfrhhishgthheslhgvgihifhhirdgtohhmqeenucfrrghrrghmpehmohguvgepshhmthhpohhuth X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] Newbie comment on constructor syntax On 10/11/2015 14:41, Romain Bardou wrote: > 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). That's what already happen at the syntactic level. I'm not proposing to change that, nor the interpretation of type declarations. The change is how constructor expressions and patterns are type-checked (and compiled), in order to make transparent at these levels whether the constructor was defined as taking a tuple or several arguments. > 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). He still needs to know, since: module X : sig type t = A of int * int end = struct type t = A of (int * int) end would still fail. Alain