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.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id AFC0FBC6B for ; Fri, 29 Jun 2007 19:57:07 +0200 (CEST) Received: from tomts22-srv.bellnexxia.net (bc.sympatico.ca [209.226.175.184]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5THv6pY006140 for ; Fri, 29 Jun 2007 19:57:07 +0200 Received: from pastel.home ([70.55.83.23]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070629175705.FUAM875.tomts22-srv.bellnexxia.net@pastel.home> for ; Fri, 29 Jun 2007 13:57:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id 562627F5C; Fri, 29 Jun 2007 13:57:05 -0400 (EDT) Message-ID: To: caml-list@yquem.inria.fr Subject: Re: let int = ?([' ' '\t'] '-') digits+ References: <200706291639.39529.jon@ffconsultancy.com> From: Stefan Monnier User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:GBsgEYr1dIBp2XX5yyZnVfugsEE= Date: Fri, 29 Jun 2007 13:57:05 -0400 In-Reply-To: <200706291639.39529.jon@ffconsultancy.com> (Jon Harrop's message of "Fri\, 29 Jun 2007 16\:39\:39 +0100") MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at discorde with ID 468547F2.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; haskell:01 int:01 let:03 guess:04 variable:06 '-':07 seem:08 function:08 function:08 rather:08 passes:10 constant:10 introduces:10 doesn't:12 doesn't:12 > Is this a good idea? Don't think so: it doesn't help the case where you want to use negation on a variable rather than a constant, so it introduces a fairly subtle inconsistency which doesn't seem to be worth the trouble. I guess in Haskell you could use type class trickery so that "f - 3" substracts 3 from f if f is numeric and passes -3 to f if f is a function (I leave the case where f is both a function and a member of the Number class as an exercise to the user). that would be even more evil, Stefan