From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA14226 for caml-red; Fri, 16 Jun 2000 20:31:42 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA25569 for ; Fri, 16 Jun 2000 16:28:50 +0200 (MET DST) Received: from suburbia.net (suburbia.net [203.4.184.1]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e5GESdr25269 for ; Fri, 16 Jun 2000 16:28:47 +0200 (MET DST) Received: by suburbia.net (Postfix, from userid 110) id 97DB56C4C7; Fri, 16 Jun 2000 23:55:53 +1000 (EST) To: Nicolas barnier Cc: ocaml Subject: Re: Warning messages and lonely variables References: <394786F8.503FF0C3@recherche.enac.fr> Cc: proff@iq.org From: Julian Assange Date: 16 Jun 2000 23:55:53 +1000 In-Reply-To: Nicolas barnier's message of "Wed, 14 Jun 2000 15:22:00 +0200" Message-ID: User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.1 (Big Bend) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: weis@pauillac.inria.fr Nicolas barnier writes: > Wouldn't it be judicious to warn the user whenever a variable appears in > the left hand-side of a (let/pattern-) binding and not used anymore in > the following code, like they do in Prolog (e.g. within the Eclipse > compiler) ? This is one of the source of many (of my) stupid bugs > (especially when modifying pieces of code) and surely a desirable > feature of a correct program. It seems also not > so intricate to check (from my naive user standpoint at least). Yes, this has bitten me off several times already. Similarly, code computed as unreachable in graph/flow analysis should generate a warning. Cheers, Julian.