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 9FCF27EEFA for ; Tue, 10 Nov 2015 11:44:32 +0100 (CET) IronPort-PHdr: 9a23:I9+egxJKUNB2TnN41dmcpTZWNBhigK39O0sv0rFitYgVKv7xwZ3uMQTl6Ol3ixeRBMOAu68C17ed6v2ocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC0oLriqvrptX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4CPESAKO4DM2W38alQcAVxLC6Rj7WL/6qDriqu1m1S+BMIv9SrViHXyp5qJvDRvpkzsvNjgj8WiRhNYjorhcpUeIoxV+xcb6eoCOP/o2KqrZdNIcA2RbX91aVwRFD5O9YYpJBO0Ea7UL57LhrkcD+EPtTTKnA/nin3oR3if7 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: A0CFAACNyUFWnBVHilJexTSDPYJTAoE8OxEBAQEBAQEBARABAQEBAQgLCQkhLoIugggBAQQjBBFAEQsYAgIFFgsCAgkDAgECAUUGAQwIAQGILrFlkGABAQgBAQEBH4EBhVOEfoQpg0yBRAWWSI0niR2TJgI3glOBXoYfAQEB X-IPAS-Result: A0CFAACNyUFWnBVHilJexTSDPYJTAoE8OxEBAQEBAQEBARABAQEBAQgLCQkhLoIugggBAQQjBBFAEQsYAgIFFgsCAgkDAgECAUUGAQwIAQGILrFlkGABAQgBAQEBH4EBhVOEfoQpg0yBRAWWSI0niR2TJgI3glOBXoYfAQEB X-IronPort-AV: E=Sophos;i="5.20,270,1444687200"; d="scan'208";a="186904587" 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 11:44:32 +0100 Received: from mta10.int.yaziba.net (unknown [217.117.151.14]) by mx30.yaziba.net (mx10.yaziba.net) with ESMTP id 4588B1A745A; Tue, 10 Nov 2015 11:44:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 891FBCA65B; Tue, 10 Nov 2015 11:44:31 +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 NasO7PmgJS2c; Tue, 10 Nov 2015 11:44:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 62DAFCAD1A; Tue, 10 Nov 2015 11:44:31 +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 jaKQ_3-Ih5Bx; Tue, 10 Nov 2015 11:44:31 +0100 (CET) Received: from [10.0.210.141] (unknown [185.23.92.144]) by mta10.int.yaziba.net (Postfix) with ESMTPSA id 3F928CA65B; Tue, 10 Nov 2015 11:44:31 +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> From: Alain Frisch Message-ID: <5641CA8E.4060909@lexifi.com> Date: Tue, 10 Nov 2015 11:44:30 +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: <5641C62C.9000606@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 11:25, Romain Bardou wrote: > In the Mantis thread I proposed that #C or (C) would be the curried > version of constructor C. If we go in the direction of making n-ary constructors behave as constructor taking a tuple (at the expression level) then it seems confusing that #C would mean something different for: type t = A of int * int and for: type t = A of (int * int) Moreover, I'm not sure about the benefit: how often do you need to partially apply a constructor? And it's easy to define manually the helper function (let a x y = A (x, y)) if needed. I don't think adding dedicated syntax is justified here. Andreas suggested that a non-constant unapplied constructor would be interpreted as a function (i.e. just A would be interpreted as (fun x -> A x)). This would allow writing for instance "List.map Some l", and have the nice consequence that "Some e" becomes equivalent to "(Some) e". The only drawback I can think of with this idea is less useful error locations when changing a constant constructor into a non-constant one. Alain