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.1 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 63DB7BB84 for ; Wed, 28 Jan 2009 20:08:40 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAN87gElPrU4G/2dsb2JhbADNEYVHBg X-IronPort-AV: E=Sophos;i="4.37,339,1231110000"; d="scan'208";a="22160135" Received: from oak.tepkom.ru ([79.173.78.6]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 28 Jan 2009 20:08:39 +0100 Received: from localhost (localhost [127.0.0.1]) by oak.tepkom.ru (Postfix) with ESMTP id E266D311A80; Wed, 28 Jan 2009 22:08:38 +0300 (MSK) X-Virus-Scanned: amavisd-new 2.6.1 (20080629) at tepkom.ru Received: from oak.tepkom.ru ([127.0.0.1]) by localhost (oak.tepkom.ru [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Gc7L+tcjkblJ; Wed, 28 Jan 2009 22:08:38 +0300 (MSK) Received: from [192.168.1.4] (ppp78-37-146-68.pppoe.avangarddsl.ru [78.37.146.68]) (Authenticated sender: db) by oak.tepkom.ru (Postfix) with ESMTP id CCD56311A0F; Wed, 28 Jan 2009 22:08:37 +0300 (MSK) Message-ID: <4980AD22.1000607@tepkom.ru> Date: Wed, 28 Jan 2009 22:08:18 +0300 From: Dmitri Boulytchev User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: fvdp@decis.be Cc: caml-list Subject: Re: [Caml-list] Warning wished References: <1233150828.7199.213.camel@localhost> <49806746.9030507@tepkom.ru> <1233152896.7199.232.camel@localhost> <49806F33.7090205@tepkom.ru> <4980A418.3040003@decis.be> In-Reply-To: <4980A418.3040003@decis.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; compiler:01 compiler:01 skipping:01 ocaml:01 imho:01 caml-list:01 constraint:01 expression:02 tepkom:02 seems:03 latter:03 unit:03 unit:03 languages:03 long:06 > There's the question of what the compiler _does_, what the compiler > _could_ do and what the compiler _should_ do. > The latter is mainly a matter of taste :) > I don't think "this 'a could be unit" is a good reason for skipping > the warning. On the contrary, "this 'a will probably sometimes be a > real value" seems a sufficient reason to add a warning. If needed, the > programmer can easily suppress the warning by adding "ignore" or > adding a ": unit" type constraint (whichever applies). I believe that compiler for statically-typed languages has to take all the responsibility on type information it delivers to user. So when it says "this expression has type X, but here is used as type unit" it must not mean "well, sometimes it hasn't" :) > (Remains to see whether adding the warning to OCaml is worth the > manwork.) IMHO it definitely doesn't deserve such a long discussion :)))) BR, Dmitri.