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.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 99CBEBC6B for ; Thu, 22 Feb 2007 16:34:58 +0100 (CET) Received: from smtp22.orange.fr (smtp22.orange.fr [80.12.242.28]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1MFYwYX012483 for ; Thu, 22 Feb 2007 16:34:58 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2201.orange.fr (SMTP Server) with ESMTP id 0F9CA1C00089; Thu, 22 Feb 2007 16:34:58 +0100 (CET) Received: from wwinf2216 (wwinf2216 [172.22.131.60]) by mwinf2201.orange.fr (SMTP Server) with ESMTP id 02B331C00082; Thu, 22 Feb 2007 16:34:58 +0100 (CET) X-ME-UUID: 20070222153458111.02B331C00082@mwinf2201.orange.fr From: Frederic GAVA Reply-To: frederic.gava@wanadoo.fr To: David Teller , caml-list@yquem.inria.fr Message-ID: <7639252.205431172158497978.JavaMail.www@wwinf2216> Subject: Re: [Caml-list] Feature request : Tuples vs. records MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [80.11.105.10] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~||~| X-WUM-REPLYTO: |~| Date: Thu, 22 Feb 2007 16:34:58 +0100 (CET) X-j-chkmail-Score: MSGID : 45DDB822.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 45DDB822.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gava:01 gava:01 unboxed:01 beginner's:01 ocaml:01 bug:01 ric:98 equality:01 beginners:01 caml-list:01 caml-list:01 tuples:01 pair:01 pair:01 int:01 Hi David, Another difference is that (If I remember) record of float are unboxed and = not tuple of float. But perhaps it could be done. Also, I do understand the true difference between write {x=3D1;y=3D2} (9 caracters) and (~x:1,~y:2) (11 caracters) except syntaxic = one (I thinks that =3D is simpler that : which is more for type) Fr=C3=A9d=C3=A9ric Gava > I envision something like > # (1,2);; > - : int * int =3D (1, 2) >=20 > # let pair_2 =3D (~x:1, ~y:2);; > pair_2 : x:int * y:int =3D (1, 2) >=20 > # let pair_3 =3D (~y:2, ~x:1);; > pair_3 : y:int * x:int =3D (2, 1) (*or perhaps normalisation, say base= d=20 > on the lexicographical order of labels*) >=20 > # pair_2 =3D pair_3;; (*structural equality*) > true >=20 > # match pair_2 with (~y:y, ~x:x) -> (x,y);; > - : int * int =3D (1, 2) >=20 >=20 > Is anything such considered ? >=20 > Thanks, > David >=20 > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >=20 >