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=0.2 required=5.0 tests=AWL 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 C804CBC69 for ; Thu, 22 Feb 2007 16:28:27 +0100 (CET) Received: from triton.rz.uni-saarland.de (triton.rz.uni-saarland.de [134.96.7.25]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1MFSRob010179 for ; Thu, 22 Feb 2007 16:28:27 +0100 Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by triton.rz.uni-saarland.de (8.12.11.20060614/8.12.10) with ESMTP id l1MFSPJY2056203 for ; Thu, 22 Feb 2007 16:28:25 +0100 (CET) Received: from mail.ps.uni-sb.de (james.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.14.0/2007012900) with ESMTP id l1MFSPgY027106 for ; Thu, 22 Feb 2007 16:28:25 +0100 (CET) Received: from groove.ps.uni-sb.de ([134.96.186.112]) by mail.ps.uni-sb.de with esmtp (Exim 4.50) id 1HKFrs-0008IW-Cr; Thu, 22 Feb 2007 16:28:24 +0100 Message-ID: <45DDB697.6080004@ps.uni-sb.de> Date: Thu, 22 Feb 2007 16:28:23 +0100 From: Andreas Rossberg User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: caml-list@yquem.inria.fr References: <45DD6F8C.7080508@ens-lyon.org> <45DD73A8.3040703@fmf.uni-lj.si> <1172148077.5345.18.camel@rosella.wigram> In-Reply-To: <1172148077.5345.18.camel@rosella.wigram> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 134.96.186.112 X-SA-Exim-Mail-From: rossberg@ps.uni-sb.de Subject: Re: [Caml-list] Feature request : Tuples vs. records X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mail.ps.uni-sb.de) X-AntiVirus: checked by AntiVir Milter (version: 1.1.3-1; AVE: 7.3.1.38; VDF: 6.37.1.139; host: AntiVir1) X-Miltered: at concorde with ID 45DDB69B.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; rossberg:01 rossberg:01 ocaml:01 sml:01 ocaml:01 structurally:01 sml:01 syntax:01 wrote:01 syntactic:01 typing:01 caml-list:01 andreas:01 andreas:01 tuples:01 skaller wrote: > >> By the way, I always wondered why ocaml doesn't have generic projection >> operations from cartesian products (I belive they are writen #1, #2, #3 >> ... in SML). > > There's another difference in Ocaml: records > are nominally typed, tuples are structurally typed. In fact, these are closely related. In SML, tuples *are* records: the syntax (x,y) is merely syntactic sugar for {1=x, 2=y}, where 1 and 2 are numeric labels. Record projection #lab thus naturally applies to tuples. However, that definition of tuples requires structural record typing. -- Andreas Rossberg, rossberg@ps.uni-sb.de