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=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id EEE10BC6C for ; Mon, 28 Jan 2008 16:41:10 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAFuGnUdCm3xr/2dsb2JhbACCOzUpiWqePQ X-IronPort-AV: E=Sophos;i="4.25,260,1199660400"; d="scan'208,217";a="7335411" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Jan 2008 16:41:10 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0SFf2Re028538 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 28 Jan 2008 16:41:10 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAFuGnUdCm3xr/2dsb2JhbACCOzUpiWqePQ X-IronPort-AV: E=Sophos;i="4.25,260,1199660400"; d="scan'208,217";a="7335409" Received: from janestcapital.com (HELO smtp.janestcapital.com) ([66.155.124.107]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Jan 2008 16:41:09 +0100 Received: from [172.25.129.161] [38.96.172.125] by janestcapital.com with ESMTP (SMTPD-9.10) id A78C0390; Mon, 28 Jan 2008 10:41:00 -0500 Message-ID: <479DF788.7010205@janestcapital.com> Date: Mon, 28 Jan 2008 10:40:56 -0500 From: Brian Hurt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Loup Vaillant Cc: caml-list@inria.fr Subject: Re: [Caml-list] [OSR] OCaml Standard Recommandation Process References: <1201440183.6302.27.camel@Blefuscu> <200801272107.23900.jon@ffconsultancy.com> <891bd3390801271347y56af21cam492ccaac1348bb05@mail.gmail.com> <200801281204.00689.jon@ffconsultancy.com> <479DE545.9050306@janestcapital.com> <6f9f8f4a0801280715m43275999k6d3e7294c2717107@mail.gmail.com> In-Reply-To: <6f9f8f4a0801280715m43275999k6d3e7294c2717107@mail.gmail.com> Content-Type: multipart/alternative; boundary="------------010205080605050800060703" X-Miltered: at discorde with ID 479DF78E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 overloading:01 inference:01 inference:01 overloading:01 foo:01 non-trivial:01 ocaml:01 foo:01 non-trivial:01 28,:98 28,:98 imho:01 imho:01 wrote:01 This is a multi-part message in MIME format. --------------010205080605050800060703 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Loup Vaillant wrote: >2008/1/28, Brian Hurt : > > >>I *hate* operator overloading. My experience in C++ is for every time >>this feature is used legitimately (i.e. to implement complex numbers or >>whatever), it's abused 10 times- and that's ignoring C++'s use of the >>bit shift operators << and >> for I/O, and the use of + for string >>concatentation, both of which I'd argue really should be considered >>abuses, as far as I'm concerned. And this is ignoring the difficulty of >>type inference in the presence of overloaded operators. >> >>The best way to handle this IMHO is Haskell-style type classes. Which >>solves the whole type inference problem, and rules most of what I >>consider abuses of operator overloading (for example, if you have a '+' >>operator, you also have to have a '*' operator- and what is "foo" * >>"bar"?). But this is a very non-trivial change to the language. >> >> > >Err, are you really suggesting type classes to be added in Ocaml? > > No. I was using that to try and kill the idea of operator overloading. Brian --------------010205080605050800060703 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Loup Vaillant wrote:
2008/1/28, Brian Hurt <bhurt@janestcapital.com>:
  
I *hate* operator overloading.  My experience in C++ is for every time
this feature is used legitimately (i.e. to implement complex numbers or
whatever), it's abused 10 times- and that's ignoring C++'s use of the
bit shift operators << and >> for I/O, and the use of + for string
concatentation, both of which I'd argue really should be considered
abuses, as far as I'm concerned.  And this is ignoring the difficulty of
type inference in the presence of overloaded operators.

The best way to handle this IMHO is Haskell-style type classes.  Which
solves the whole type inference problem, and rules most of what I
consider abuses of operator overloading (for example, if you have a '+'
operator, you also have to have a '*' operator- and what is "foo" *
"bar"?).  But this is a very non-trivial change to the language.
    

Err, are you really suggesting type classes to be added in Ocaml?
  

No.  I was using that to try and kill the idea of operator overloading.

Brian

--------------010205080605050800060703--