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.7 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 49F03BB84 for ; Wed, 13 Aug 2008 12:12:45 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiADAKxOokhQRFuwiGdsb2JhbACRdwEBAQ8gpQSBVQ X-IronPort-AV: E=Sophos;i="4.32,201,1217800800"; d="scan'208";a="13960925" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 13 Aug 2008 12:12:45 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1KTDLP-0000qi-Ul; Wed, 13 Aug 2008 11:12:43 +0100 Date: Wed, 13 Aug 2008 11:12:43 +0100 To: David Allsopp Cc: OCaml List Subject: Re: [Caml-list] Value shadowing Message-ID: <20080813101243.GA2038@annexia.org> References: <9E2C98C8798A487DAE77F20A9DC4F1E8@countertenor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9E2C98C8798A487DAE77F20A9DC4F1E8@countertenor> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; 0100,:01 foo:01 ocaml:01 wrote:01 caml-list:01 tail:01 match:02 variables:02 let:03 raise:03 exit:04 i'd:06 wed:06 red:92 annoying:08 On Wed, Aug 13, 2008 at 09:54:36AM +0100, David Allsopp wrote: > Suppose I have this piece of code: > > let foo xs = > match xs with > x::xs -> if x > then xs (* Return the tail of the list *) > else xs (* Return the entire list *) > | [] -> raise Exit I'd find it very counter-intuitive if OCaml behaved like this, and annoying if it gave a warning. Just name the variables to be different! Rich. -- Richard Jones Red Hat