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 8FDB07FD2A for ; Mon, 9 Nov 2015 11:35:36 +0100 (CET) IronPort-PHdr: 9a23:bwk4+BNDzAw+jdfGUJ0l6mtUPXoX/o7sNwtQ0KIMzox0KPj6rarrMEGX3/hxlliBBdydsKIZzbaN+Pm7EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35nxi7v5osabSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6Lpyv/JHBK7zeqB9Sb1DEBwnNXo07Yvlr0rtVwyKs1IaXn8bmwEAOQ/e9xv3RJi55jH9rfF31TOVFcjuTPUvRi/k6L1kHky7wBwbPiI0pTmEwvd7i7hW9Uqs Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=rossberg@mpi-sws.org; spf=Pass smtp.mailfrom=rossberg@mpi-sws.org; spf=None smtp.helo=postmaster@hera.mpi-klsb.mpg.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rossberg@mpi-sws.org) identity=pra; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="rossberg@mpi-sws.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rossberg@mpi-sws.org designates 139.19.1.49 as permitted sender) identity=mailfrom; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="rossberg@mpi-sws.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@hera.mpi-klsb.mpg.de) identity=helo; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="postmaster@hera.mpi-klsb.mpg.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B4AABydkBWhDEBE4tEGoQOb8AoIYVvAoEzPBABAQEBAQEBARABAQEKBwQJCSEugi6CCAEBBBIVEQgBATYCDwsYCRYPCQMCAQIBIwUdEwgBAR6IDA07oHmBMT4xileFVAEFiz0BAQgdBotShSeEEpZNhR6JZEmDd4J+BJMoOIIvI4FecQGFZQEBAQ X-IPAS-Result: A0B4AABydkBWhDEBE4tEGoQOb8AoIYVvAoEzPBABAQEBAQEBARABAQEKBwQJCSEugi6CCAEBBBIVEQgBATYCDwsYCRYPCQMCAQIBIwUdEwgBAR6IDA07oHmBMT4xileFVAEFiz0BAQgdBotShSeEEpZNhR6JZEmDd4J+BJMoOIIvI4FecQGFZQEBAQ X-IronPort-AV: E=Sophos;i="5.20,265,1444687200"; d="scan'208";a="186715911" Received: from hera.mpi-klsb.mpg.de ([139.19.1.49]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 09 Nov 2015 11:35:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mpi-sws.org; s=mail200803; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=TU6wPTY2AJQ0L9FuEn4rHePLb2ETTMgNRdakIA1en8Q=; b=FG36IxlWSz4pMv26GMFk68yEM1KJyWSpZ3gPSbgWA7nPfsHY+hbGtE37gQypUNVYUlPuu+bN6JVh+UF9yafLAQj/MGSaUTZsiIdbWeDvgC1IMW4Q8Kbh98QizI2c1z2wlgZicPI9Dtsx5B45tej2hTCe0+SSWtW7NcG6s9AlnZo=; Received: from maniac.mpi-klsb.mpg.de ([139.19.1.28]:48686) by hera.mpi-klsb.mpg.de (envelope-from ) with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) id 1ZvjnH-0008JV-Cr; Mon, 09 Nov 2015 11:35:25 +0100 Received: from [74.125.57.238] (port=33004 helo=bozo.muc.corp.google.com) by maniac.mpi-klsb.mpg.de (envelope-from ) with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) id 1ZvjnG-000841-SP; Mon, 09 Nov 2015 11:35:22 +0100 To: 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> From: Andreas Rossberg Message-ID: <564076EA.7020805@mpi-sws.org> Date: Mon, 9 Nov 2015 11:35:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56407297.2060309@frisch.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-MPI-Local-Sender: true Subject: Re: [Caml-list] Newbie comment on constructor syntax On 11/09/2015 11:16 AM, Alain Frisch wrote: > On 09/11/2015 09:09, Soegtrop, Michael wrote: >> The notation looks like tuples, both in definition and use, but it isn't. > > The should be not big obstacle to allow using real tuples > (values/patterns) with multi-argument constructors, thus perhaps > reducing the confusion. In expression at least, this should be quite > straightfoward because it can be understood as a local syntactic > rewriting ("C e" -> "let (x1, ..., xn) = e in C (x1, ..., xn)" when C is > a constructor with arity > 1 and "e" is not a syntactic tuple). > > See: > http://caml.inria.fr/mantis/view.php?id=6455 Yes please, I would appreciate such sugar. Even more I would appreciate generalising that to allowing constructors to be used as first-class expressions (i.e., unapplied "C" -> "fun (x1,...,xN) -> C (x1,...,xN)" when C is a constructor with arity > 0). I had to write some AST mapping code recently that would have vastly benefited from that. /Andreas