From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8434ABC8A for ; Sun, 30 Jan 2005 06:56:58 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0U5uw4g019354 for ; Sun, 30 Jan 2005 06:56:58 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA05196 for ; Sun, 30 Jan 2005 06:56:57 +0100 (MET) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0U5utbl019343 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 30 Jan 2005 06:56:56 +0100 Received: (qmail 24275 invoked from network); 30 Jan 2005 05:56:53 -0000 Received: from shell3.sea5.speakeasy.net ([69.17.116.4]) (envelope-sender ) by mail26.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 30 Jan 2005 05:56:53 -0000 Date: Sat, 29 Jan 2005 21:56:53 -0800 (PST) From: brogoff To: caml-list Subject: Re: [Caml-list] cyclic types In-Reply-To: <1F350A61-7250-11D9-866D-000D9345235C@inria.fr> Message-ID: References: <7f8e92aa0501290415321a8e46@mail.gmail.com> <6b8a914205012905427c79cd85@mail.gmail.com> <7f8e92aa05012909335800c97@mail.gmail.com> <1F350A61-7250-11D9-866D-000D9345235C@inria.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 41FC772A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41FC7727.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 damien:01 wrote:01 wrote:01 iirc:01 pointer:01 -rectypes:01 -rectypes:01 annotations:01 inference:01 annotations:01 speakeasy:01 doligez:01 constructor:01 cyclic:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Sun, 30 Jan 2005, Damien Doligez wrote: > On Jan 29, 2005, at 18:33, Radu Grigore wrote: > > Can you give an example of why rectypes by default is dangerous? > > IIRC, rectypes are off by default because they trade a small increment > in expressive power for a large degradation of the intelligibility of > type-checking error messages. I don't think they are dangerous in the > sense of breaking the type system. Right, that's what I meant. They certainly don't break the type system. There was a fairly lengthy discussion of this topic about 5 years ago, but since browsing the archives now is a lot harder than when I started, I'll let someone else dig up the pointer. In almost all cases, you can achieve the effect of -rectypes by introducing an extra constructor. I think the degradation in intelligibility you mention is only in the case of -rectypes being the default. If (optional) type annotations could drive the inference, I think we'd have the best of both worlds. It seems like FPL type systems are going to have to move in the direction of the more programmer supplied annotations anyways. -- Brian