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=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 730A6BC0A for ; Wed, 23 May 2007 16:06:55 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4NE6rV3027998 for ; Wed, 23 May 2007 16:06:54 +0200 X-IronPort-AV: E=Sophos;i="4.14,570,1170595800"; d="scan'208";a="133106061" Received: from ppp59-172.lns2.syd6.internode.on.net (HELO [192.168.1.201]) ([121.44.59.172]) by ipmail01.adl2.internode.on.net with ESMTP; 23 May 2007 23:36:49 +0930 Subject: Re: [Caml-list] Teaching bottomline, part 3: what should improve. From: skaller To: Gerd Stolpmann Cc: Brian Hurt , OCaml In-Reply-To: <1179927411.24233.5.camel@localhost.localdomain> References: <1179871823.6966.78.camel@Blefuscu> <1179875804.17533.33.camel@rosella.wigram> <20070523091909.GA8019@snarc.org> <46543875.9010305@janestcapital.com> <1179927411.24233.5.camel@localhost.localdomain> Content-Type: text/plain Date: Thu, 24 May 2007 00:06:48 +1000 Message-Id: <1179929208.26363.26.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46544A7D.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 gerd:01 stolpmann:01 variants:01 constructors:01 coercions:01 annotations:01 ocaml:01 mismatch:01 sourceforge:01 polymorphic:01 wrote:01 constructor:01 recursively:01 caml-list:01 On Wed, 2007-05-23 at 15:36 +0200, Gerd Stolpmann wrote: > > There is certainly a point. The length of type errors depends on your > programming style. It can also depend on the size of the type involved, which is not nearly as much of a stylistic thing. If you have several polymorphic variants types of 20-30 constructors each, recursively included in each other .. you can get errors many hundreds of lines long, involving scores of invented type variables, and for me, when i get such errors, the information in the diagnostic is more or less entirely useless. I use the error location and knowledge of my last change to track down where to add coercions and annotations to help find the error .. I got one a couple of days ago in code generated by dypgen .. and just gave up .. since I didn't write the code and had no idea what the types were (my types were involved too .. the combination was a type about 80 lines long .. :) Ocaml has improved though: today it often gives a nasty message and the kindly tells you which constructor is causing the mismatch. This helps a LOT! -- John Skaller Felix, successor to C++: http://felix.sf.net