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.2 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 29FFEBC69 for ; Fri, 23 Feb 2007 15:14:57 +0100 (CET) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.224]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NEEt0a004001 for ; Fri, 23 Feb 2007 15:14:56 +0100 Received: by wr-out-0506.google.com with SMTP id i22so502027wra for ; Fri, 23 Feb 2007 06:14:54 -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:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eq9n3AfVMqrXodlmmmxmJw3ZSgS09pTif8nMgP7XFIuNEOiwWKBn/71HlpxUyVHh4W6nxGDa1Jsf3yNqxh8irE5JOnGRcq5fTW2j25HBHV4q4p/uMkAJaL+P3dqDAUh0GhbuD4PkeA01TGLmxWC/i7mCbyB18b+SwjICa8YV1vY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cbptc96bcaEm4dvAQKcolfFrPKTzQJsncA+vT3614Yb9lpbGAD+oLh2p1HrGxe9W2ddn7B3d60+CO19VWGe+lrjxaCsbiyYM4h5i1CrR5ZEUcfXT34XYUwEOMqKYc8AK+sfTZQ+IDogfiU6xAyIpYdIKqOFlwZ+AiaWuxhSBqPM= Received: by 10.114.126.1 with SMTP id y1mr81030wac.1172240090172; Fri, 23 Feb 2007 06:14:50 -0800 (PST) Received: by 10.114.183.4 with HTTP; Fri, 23 Feb 2007 06:14:50 -0800 (PST) Message-ID: Date: Fri, 23 Feb 2007 15:14:50 +0100 From: "Nicolas Pouillard" To: "Till Varoquaux" Subject: Re: [Caml-list] Feature request : Tuples vs. records Cc: "Richard Jones" , caml-list@inria.fr In-Reply-To: <9d3ec8300702230543p37471dcco28c7dba77564bf1a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7639252.205431172158497978.JavaMail.www@wwinf2216> <45DDC1CB.2090401@ens-lyon.org> <20070223.103945.99613677.garrigue@math.nagoya-u.ac.jp> <20070223133450.GA26686@furbychan.cocan.org> <9d3ec8300702230543p37471dcco28c7dba77564bf1a@mail.gmail.com> X-j-chkmail-Score: MSGID : 45DEF6DF.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45DEF6DF.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 syntax:01 criticizing:01 struct:01 polymorphism:01 ocaml:01 variants:01 beginner's:01 ocaml:01 bug:01 beginner's:01 bug:01 23,:98 polymorphic:01 beginners:01 On 2/23/07, Till Varoquaux wrote: > I also agree: > IMHO , it woud feel natural to have > open .. in (* <-- there's already a camlp4 extension that brings this*) > type ... in > etc... > it would be coherent with the let syntax. However I don't know the > deep implications of such a change and happen to be very prompt > criticizing. I'm sure there is a profound reason for the language not > be like this. You already have it in some sense: let module M = struct type t = ... end in ... M.t ... > > Till > > On 2/23/07, Richard Jones wrote: > > 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 > > > > _______________________________________________ > > 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 > > > > _______________________________________________ > 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 > -- Nicolas Pouillard