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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 33B51BC6B for ; Fri, 29 Jun 2007 20:11:26 +0200 (CEST) Received: from looneymail-a4.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5TIBPQq019796 for ; Fri, 29 Jun 2007 20:11:25 +0200 Received: from [192.168.101.117] (unknown [66.84.219.53]) by looneymail-a4.g.dreamhost.com (Postfix) with ESMTP id AABF6125FCF for ; Fri, 29 Jun 2007 11:11:23 -0700 (PDT) Message-ID: <46854B4B.2060003@fischerventure.com> Date: Fri, 29 Jun 2007 13:11:23 -0500 From: Robert C Fischer Reply-To: robert.fischer@SmokejumperIT.com Organization: Fischer Venture Managment Corporation User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: let int = ?([' ' '\t'] '-') digits+ References: <200706291639.39529.jon@ffconsultancy.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46854B4D.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 polymorphism:01 haskell:01 beginner's:01 ocaml:01 bug:01 beginners:01 wrote:01 caml-list:01 caml-list:01 int:01 bin:01 caml:02 caml:02 archives:02 Syntax polymorphism violates the principle of least surprise. It is, indeed, Teh Eevil. ~~ Robert. Stefan Monnier wrote: >> 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >