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 467D07FD28 for ; Mon, 9 Nov 2015 09:10:07 +0100 (CET) IronPort-PHdr: 9a23:1alzLx86MYDRZ/9uRHKM819IXTAuvvDOBiVQ1KB80escTK2v8tzYMVDF4r011RmSDdidt6gP17eempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lR8iO1Y/riqibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wysevsrxzKS0Ov72EQQy1ClB1SBiDO5Qm/WpDrv23xse8rnGG0OcrsTLkyEQuv7qJmUle8hjgvOzM//WuRh8phi+RXrUTyiQZ4xtueW4aYO+ZkebuZNfYbTmpIU8IbH3hEA4i8ZoYLSfEGMOlEtY7lj1oIsRa6QwKrAbW8mXdzmnbq0PhigKwaGgbc0VllRopWvQ== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=michael.soegtrop@intel.com; spf=Pass smtp.mailfrom=michael.soegtrop@intel.com; spf=None smtp.helo=postmaster@mga02.intel.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of michael.soegtrop@intel.com) identity=pra; client-ip=134.134.136.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of michael.soegtrop@intel.com designates 134.134.136.20 as permitted sender) identity=mailfrom; client-ip=134.134.136.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; 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@mga02.intel.com) identity=helo; client-ip=134.134.136.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="postmaster@mga02.intel.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BzAAB2VEBWnBSIhoZehA5vBsAiGYV3AoEwOxEBAQEBAQEBARABAQEBAQYNCQkhLoIuggcBAQEDAToPMBACAQgOFBQQMiUBAQQBDQ2IHgcBvz0BAQEBAQEBAwEBAQEBAQEBAQEBGIZWg3aBBoRbg0mBFQWWSAGpazeCU4FdcoRfAYEGAQEB X-IPAS-Result: A0BzAAB2VEBWnBSIhoZehA5vBsAiGYV3AoEwOxEBAQEBAQEBARABAQEBAQYNCQkhLoIuggcBAQEDAToPMBACAQgOFBQQMiUBAQQBDQ2IHgcBvz0BAQEBAQEBAwEBAQEBAQEBAQEBGIZWg3aBBoRbg0mBFQWWSAGpazeCU4FdcoRfAYEGAQEB X-IronPort-AV: E=Sophos;i="5.20,265,1444687200"; d="scan'208";a="186679793" Received: from mga02.intel.com ([134.134.136.20]) by mail2-smtp-roc.national.inria.fr with ESMTP; 09 Nov 2015 09:09:52 +0100 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 09 Nov 2015 00:09:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,265,1444719600"; d="scan'208";a="815166091" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga001.jf.intel.com with ESMTP; 09 Nov 2015 00:09:31 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.251]) by irsmsx110.ger.corp.intel.com ([169.254.15.163]) with mapi id 14.03.0248.002; Mon, 9 Nov 2015 08:09:30 +0000 From: "Soegtrop, Michael" To: Norman Hardy , Florian Weimer CC: "caml-list@inria.fr" Thread-Topic: [Caml-list] Newbie comment on constructor syntax Thread-Index: AdEYdh7tbwUSNAYOTYyfd0AlZw/waQCAeFV0ABMSm9A= Date: Mon, 9 Nov 2015 08:09:30 +0000 Message-ID: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E747@IRSMSX102.ger.corp.intel.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E070@IRSMSX102.ger.corp.intel.com> <87pozk6vjp.fsf@mid.deneb.enyo.de> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Newbie comment on constructor syntax Dear Florian, Norman,=20 > > Curiously, the argument is not really a tuple. This does not work: > > > > type x =3D X of int * int > > let c =3D (1, 2) in X c >=20 > However the following works: > # type x =3D X of (int * int);; > type x =3D X of (int * int) > # let c =3D (1, 2) in X c;; > - : x =3D X (1, 2) Exactly this is what is quite confusing (for the beginner): constructors ar= e a rather odd mix of multiple arguments and tuples. The notation looks lik= e tuples, both in definition and use, but it isn't. And it is not a multipl= e argument function either, since currying doesn't work. That adding parent= hesis makes it a real tuple doesn't make it better, since at some other pla= ces a*b and (a*b) are the same. To me this is quite a scar in the beauty of the language - the kind of thin= g you can't avoid to look at, if you know what I mean. Of cause it is not r= eally an issue. It is just way disappointing for new users to find this kin= d of imperfection and it gives a little dent in the enthusiasm. But just a = little one ;-) Best regards, Michael Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928