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 7C6B47EEFA for ; Mon, 9 Nov 2015 07:27:07 +0100 (CET) IronPort-PHdr: 9a23:HfGGihw2Ra72OjXXCy+O+j09IxM/srCxBDY+r6Qd0e0XIJqq85mqBkHD//Il1AaPBtWGra4ewLCK+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStOU0578jbz60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgJ45jNsgPGRA3HxnIGXnRexhxPGQ3t5xjiG5P2qCa8ve14jnq0J8rzGJ4wXi6j5qEjdxLpjSodf2o370nbh8p9huRWpgOm4RByld2HKLqJPeZzK/uONegRQnBMC4MID3RM Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=fw@deneb.enyo.de; spf=None smtp.mailfrom=fw@deneb.enyo.de; spf=None smtp.helo=postmaster@albireo.enyo.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of fw@deneb.enyo.de) identity=pra; client-ip=46.237.207.196; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="fw@deneb.enyo.de"; x-sender="fw@deneb.enyo.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of fw@deneb.enyo.de) identity=mailfrom; client-ip=46.237.207.196; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="fw@deneb.enyo.de"; x-sender="fw@deneb.enyo.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@albireo.enyo.de) identity=helo; client-ip=46.237.207.196; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="fw@deneb.enyo.de"; x-sender="postmaster@albireo.enyo.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AOBQDLO0BW/8TP7S5egztmXMAihhACCIElPBABAQEBAQEBAYEJgi6CBwEBAQMBeRALDgoJJQ8BRwYTiCYMAb86AQEBAQYBAQEBH4ZUhH6FQYN4BZZIlkAEkyg4K4QFPTSFZgEBAQ X-IPAS-Result: A0AOBQDLO0BW/8TP7S5egztmXMAihhACCIElPBABAQEBAQEBAYEJgi6CBwEBAQMBeRALDgoJJQ8BRwYTiCYMAb86AQEBAQYBAQEBH4ZUhH6FQYN4BZZIlkAEkyg4K4QFPTSFZgEBAQ X-IronPort-AV: E=Sophos;i="5.20,265,1444687200"; d="scan'208";a="186665354" Received: from albireo.enyo.de ([46.237.207.196]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 09 Nov 2015 07:27:06 +0100 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) id 1Zvfuu-000882-CN; Mon, 09 Nov 2015 07:27:00 +0100 Received: from fw by deneb.enyo.de with local (Exim 4.84) (envelope-from ) id 1Zvfuu-0003Cu-67; Mon, 09 Nov 2015 07:27:00 +0100 From: Florian Weimer To: Norman Hardy Cc: "Soegtrop\, Michael" , "caml-list\@inria.fr" References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E070@IRSMSX102.ger.corp.intel.com> <87pozk6vjp.fsf@mid.deneb.enyo.de> Date: Mon, 09 Nov 2015 07:27:00 +0100 In-Reply-To: (Norman Hardy's message of "Sun, 8 Nov 2015 14:50:57 -0800") Message-ID: <87y4e7662z.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Newbie comment on constructor syntax * Norman Hardy: >> On 2015 Nov 8, at 13:16 , Florian Weimer wrote: >> >> * Michael Soegtrop: >> >>> The one thing I find rather non intuitive is that variant constructors >>> can take only one argument - or a tuple. >> >> Curiously, the argument is not really a tuple. This does not work: >> >> type x = X of int * int >> let c = (1, 2) in X c > > However the following works: > # type x = X of (int * int);; > type x = X of (int * int) > # let c = (1, 2) in X c;; > - : x = X (1, 2) With multiple constructors per type at least, this has a different in-memory representation: two objects (the constructed value and a tuple which the value references).