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 39713BC0A for ; Wed, 23 May 2007 01:16:53 +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 l4MNGopQ012966 for ; Wed, 23 May 2007 01:16:52 +0200 X-IronPort-AV: E=Sophos;i="4.14,567,1170595800"; d="scan'208";a="132704134" 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 08:46:48 +0930 Subject: Re: [Caml-list] Teaching bottomline, part 3: what should improve. From: skaller To: David Teller Cc: OCaml In-Reply-To: <1179871823.6966.78.camel@Blefuscu> References: <1179871823.6966.78.camel@Blefuscu> Content-Type: text/plain Date: Wed, 23 May 2007 09:16:44 +1000 Message-Id: <1179875804.17533.33.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 465379E2.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 inference:01 unification:01 sourceforge:01 wrote:01 wrote:01 imho:01 caml-list:01 inferred:02 contributed:02 face:97 languages:03 somewhat:05 parallel:05 On Tue, 2007-05-22 at 18:10 -0400, David Teller wrote: > * Error messages of the type system are somewhat obscure. The reflex of > many students is "OCaml wants it to be of type XXX", rather than "there > is a contradiction in what I wrote". It would be nice if there was a way > to ask OCaml to display additional information on type errors. This is a long standing peeve of mine. Lets face it: Ocaml just lies. If it has inferred a type, then finds a contradiction, it should report both the location of the contradication AND all of the source lines that contributed to the inference. I understand that is may be hard, if not impossible, to implement, as it would require a unification engine that could manage source references in parallel with deductions .. still the information IS available originally. I bet this would be an interesting and valuable PhD project, and, IMHO, without it type inferencing languages are useless in industry. Type errors in Ocaml code are very common for the simple reason they're just about the only error you can make :) -- John Skaller Felix, successor to C++: http://felix.sf.net