From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id B5EEB7EE51 for ; Mon, 20 May 2013 18:18:52 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of darioteixeira@yahoo.com) identity=pra; client-ip=98.138.229.70; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="darioteixeira@yahoo.com"; x-sender="darioteixeira@yahoo.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of darioteixeira@yahoo.com) identity=mailfrom; client-ip=98.138.229.70; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="darioteixeira@yahoo.com"; x-sender="darioteixeira@yahoo.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nm33-vm6.bullet.mail.ne1.yahoo.com) identity=helo; client-ip=98.138.229.70; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="darioteixeira@yahoo.com"; x-sender="postmaster@nm33-vm6.bullet.mail.ne1.yahoo.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8CAO9LmlFiiuVGlGdsb2JhbABNDYQHrlGSH4EBFg4BAQEBBwsLCRIqghoFAQEEAQsgFQECFSEBAQMLBgVGLwEOAQYSBgGIDAEBAgkGBKseCYJ0hB8BIwMBIwOIVAEGCgEBAY5hMweDVAOJH44ghhcvUohSb4QP X-IPAS-Result: An8CAO9LmlFiiuVGlGdsb2JhbABNDYQHrlGSH4EBFg4BAQEBBwsLCRIqghoFAQEEAQsgFQECFSEBAQMLBgVGLwEOAQYSBgGIDAEBAgkGBKseCYJ0hB8BIwMBIwOIVAEGCgEBAY5hMweDVAOJH44ghhcvUohSb4QP X-IronPort-AV: E=Sophos;i="4.87,707,1363129200"; d="scan'208";a="15040877" Received: from nm33-vm6.bullet.mail.ne1.yahoo.com ([98.138.229.70]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 May 2013 18:18:51 +0200 Received: from [98.138.90.52] by nm33.bullet.mail.ne1.yahoo.com with NNFMP; 20 May 2013 16:18:49 -0000 Received: from [98.138.89.253] by tm5.bullet.mail.ne1.yahoo.com with NNFMP; 20 May 2013 16:18:49 -0000 Received: from [127.0.0.1] by omp1045.mail.ne1.yahoo.com with NNFMP; 20 May 2013 16:18:49 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 112947.94787.bm@omp1045.mail.ne1.yahoo.com Received: (qmail 55160 invoked by uid 60001); 20 May 2013 16:18:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1369066729; bh=7zx2oS51oyXFbSTxVIFjr0gdxYkhqevOIVO2/Dy7cU4=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HE15ujya4+Vu6Enaki0JAwyqTFNM01X7aFMA7xc27XLzWJhaASryOiJRJ3/ptL/sO0jLAckLGsd9K50cfimKU0rLlsst25UyXkWiTZ4KLYcINHveVxutTrqMiYgWOMtNecvYC+J4yQgpNwNXoNxPNajO4LOE0uwBdXlUHnvXVJg= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2PdoB3M1OrGkQG5p5rZxPo68uaO5xY4mcVQTOs6UHvKVySC4bjt/9WqKGZCTF18EJ+yItnBQ85QFOfWyW49XSAWscp41lZcjohdVCIXxdT36KeSVRfSsa5yugm6ZIHNhN2KXGBSQ23aS53bM3Nq6UgD8VvkT0L9tARmaDjJqzxY=; X-YMail-OSG: GdFRHQ4VM1l41rvyNeSIgFB7RAClVAVHPaU4IIOPqV2A2A9 Tku_fwyAOPWJRUMGlnuW8QGBQtiZcm2Ip3TMon30r3PXFnDbURsTaLfeb1AB ZP2.OSxQ5kFN_8AoURQWhmkzfa1hyVFIR1_e9VnJcP3LCibFNBpMzX9LapGX x9_N_CkxXkV5HZNqZHElBWAtoMM5IfaqeT38vJ49.04odyWFVekt_.RGZbrT j9RM988DacfIgdR4CW3gwTh1zvPipov9d69piOQut8Uz2YMS7cUCKXzEL29g Hs6X.45ccCKfbYr7QnSPtNm7cCk0YHQQO8arw09UOwaf0uvcnjXtX8uvZNyj VYfGABw7JNSsUtOVEm4ICni09rQKGR.j1pMKsdXJ9HlNlgiZ3OKun2Za61ZY iG8hZQ2GBvXJs3ESg5u.B6WovQsuen74eeZyle.zCsgFpYFIGaF2Csv_6zpq AMStaKmClCqo8GNAS63WytFOpbZHJL9mQnkcck1qLMfxLMtN1kFx5pRKXKr6 cLv.9SoymwcL1u.48pMRFkA6mXJkkewHY8MTMjMd2 Received: from [195.23.39.248] by web120405.mail.ne1.yahoo.com via HTTP; Mon, 20 May 2013 09:18:48 PDT X-Rocket-MIMEInfo: 002.001,SGksCgo.IEkgYWdyZWUgdGhhdCBtYWtpbmcgcmVjdXJzaXRpdnkgbW9yZSBleHBsaWNpdCBpcy4uLiB3ZWxsLi4uIG1vcmUgZXhwbGljaXQgOikKPiBCdXQgSSB3b25kZXIgaWYsIGluIHRoaXMgY2FzZSwgdGhpcyBpcyB0cnVseSByZWxldmFudC4gSW4gZmFjdCwgd2hlbiBJIGxvb2sgYXQKPiBPQ2FtbCBwcm9ncmFtcywgSSBzZWUgbWFueSByZWN1cnNpdmUgdHlwZXMgYW5kIHZlcnkgZmV3IHR5cGUgc2hhZG93aW5nLgo.IFRoYXQgaXMsIG1ha2luZyB0eXBlcyBub24gcmVjdXJzaXZlIHdvdWxkIGFkZCBzb20BMAEBAQE- X-Mailer: YahooMailWebService/0.8.142.542 References: <1369060290.43256.YahooMailNeo@web120405.mail.ne1.yahoo.com> Message-ID: <1369066728.52452.YahooMailNeo@web120405.mail.ne1.yahoo.com> Date: Mon, 20 May 2013 09:18:48 -0700 (PDT) From: Dario Teixeira Reply-To: Dario Teixeira To: Julien Blond , David House Cc: OCaml mailing-list In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] The rec/nonrec debate Hi, > I agree that making recursitivy more explicit is... well... more explicit= :) > But I wonder if, in this case, this is truly relevant. In fact, when I lo= ok at > OCaml programs, I see many recursive types and very few type shadowing. > That is, making types non recursive would add some "rec" or "nonrec" > keywords everywhere just to avoid a type alias in a rare case. From > readability point of view, I'm not sure it's a good deal. In the programs > I know, the ratio seems to be something like 70/30 for nonrec/rec function > while, this time, shadowing is quite often used. Here, explicit "rec" all= ows > us to avoid more "nonrec" elsewhere to continue using shadowing. In my opinion, even if a statistical analysis of a large corpus of OCaml co= de were to show that shadowing is much rarer than recursive type definitions, the case could still be made that having nonrec as the common default for both types and values would still be preferable for a) consistency, and b) avoiding the need to have both "rec" and "nonrec" as keywords. On a tangent, I also find it interesting that Mezzo has adopted the Haskell convention of type declarations being head-first.=A0 Not that I disagree: i= n fact, one could argue there is some inconsistency in the ML/OCaml convention of declaring types head-last and values head-first... Cheers, Dario