From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 44BC7BC69 for ; Fri, 23 Feb 2007 17:32:23 +0100 (CET) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NGWMdd009667 for ; Fri, 23 Feb 2007 17:32:23 +0100 Received: by nf-out-0910.google.com with SMTP id a27so943450nfc for ; Fri, 23 Feb 2007 08:32:22 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=C7pOY3UWSTIR2TEGmANvsNk6yWbfqjZoqfrv/bkYrP4a6xiOmXbrJVnhRgC2gzlsLR719HE6IVuSADXXEfQI1nnxXs567xtv3NO+n30I2uGalskUQFFwlVqgP5R88BRhiyEB1YaUKucZoLwXOp/QRxbPcBt/IUQ/7Y48aURUnAQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fTX/gherfpFw/9rqQhKNIbfe5cJ0JtgwQ4Qt4LTddFYkw+VmtTqhVrJNJIoQHrna4GjOw8ZmxINPYtYHvHq4njUNoME0z8FU90gw2Xuh1lYXj9tzVyMacW89ticUYC5m0DrzQ91LhGSzDY+p+U1F8vCycdPWTEOU/d+gZmXgqk0= Received: by 10.82.134.12 with SMTP id h12mr717960bud.1172248342171; Fri, 23 Feb 2007 08:32:22 -0800 (PST) Received: by 10.82.134.14 with HTTP; Fri, 23 Feb 2007 08:32:21 -0800 (PST) Message-ID: <4a708d20702230832m4e143586i6036980ead10042a@mail.gmail.com> Date: Fri, 23 Feb 2007 17:32:21 +0100 From: "Lukasz Stafiniak" To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Feature request : Tuples vs. records In-Reply-To: <200702230145.55947.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7639252.205431172158497978.JavaMail.www@wwinf2216> <45DDC1CB.2090401@ens-lyon.org> <200702230145.55947.jon@ffconsultancy.com> X-j-chkmail-Score: MSGID : 45DF1716.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45DF1716.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lukasz:01 variants:01 variants:01 syntax:01 syntax:01 val:01 val:01 polymorphic:01 wrote:01 wrote:01 caml-list:01 tuples:01 tuples:01 define:01 translate:04 On 2/23/07, Jon Harrop wrote: > On Thursday 22 February 2007 16:16, David Teller wrote: > > I'm more concerned about having to > > * declare every record type I use -- that looks to me clumsy and Java-like > > * differenciate between records and tuples during pattern-matching > > The same can be said of ordinary and polymorphic variants. You must declare > ordinary variants. You must distinguish between the two in patterns. > You can define a syntax extension to translate (note you can use your preferred syntax): `{x=u; y=v; z=w} ==> object val x=u val y=v val z=w method x=x method y=y method z=z end