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.0 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 A0C9FBC69 for ; Fri, 23 Feb 2007 14:34:55 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NDYpF4032219 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 23 Feb 2007 14:34:55 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1HKaZW-0006xB-00 for ; Fri, 23 Feb 2007 13:34:50 +0000 Date: Fri, 23 Feb 2007 13:34:50 +0000 To: caml-list@inria.fr Subject: Re: [Caml-list] Feature request : Tuples vs. records Message-ID: <20070223133450.GA26686@furbychan.cocan.org> References: <7639252.205431172158497978.JavaMail.www@wwinf2216> <45DDC1CB.2090401@ens-lyon.org> <20070223.103945.99613677.garrigue@math.nagoya-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070223.103945.99613677.garrigue@math.nagoya-u.ac.jp> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at concorde with ID 45DEED7B.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; polymorphism:01 ocaml:01 variants:01 23,:98 polymorphic:01 wrote:01 avoids:01 typing:01 caml-list:01 tuples:01 tuples:01 objects:02 garrigue:03 types:03 jacques:03 On Fri, Feb 23, 2007 at 10:39:45AM +0900, Jacques Garrigue wrote: > On the other hand structural typing avoids extra definitions, and > allows more code sharing and polymorphism. One cannot imagine ML > without structural tuples. In ocaml, you have also objects that can > mimic records, and polymorphic variants for sum types. The penalty of having the extra definitions wouldn't be so bad if 'type t = ...' could appear inside let statements (ie. not just at the top level). At the moment, type definitions are often a long way away from where they are used. Rich. -- Richard Jones Red Hat UK Limited