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 autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id DC157BC69 for ; Sat, 12 May 2007 04:54:17 +0200 (CEST) Received: from pih-relay06.plus.net (pih-relay06.plus.net [212.159.14.133]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4C2sHTB015162 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 12 May 2007 04:54:17 +0200 Received: from [80.229.56.224] (helo=beast.local) by pih-relay06.plus.net with esmtp (Exim) id 1HmhkN-0006of-Gd; Sat, 12 May 2007 03:54:15 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: "Nicolas Pouillard" Subject: Re: [Caml-list] Custom operators in the revised syntax Date: Sat, 12 May 2007 03:48:50 +0100 User-Agent: KMail/1.9.5 References: <200705111537.32561.jon@ffconsultancy.com> In-Reply-To: Cc: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705120348.50308.jon@ffconsultancy.com> X-Miltered: at discorde with ID 46452C59.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 overloading:01 ocaml:01 fsharp:01 46,:98 frog:98 wrote:01 caml-list:01 revised:02 float:03 types:03 vector:05 products:86 ltd:86 things:13 On Friday 11 May 2007 15:46, you wrote: > > Operator overloading and template metaprogramming were the only things I > > missed moving from C++ to OCaml. :-) > > But having these custom operators reduce the pain, right? Using, +, +., +| and +|| is better than add, add_float, add_vector, add_matrix but allowing + to be used to all such types ('a -> 'a -> 'a) is much better still. It isn't even that hard to add to the language. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. The F#.NET Journal http://www.ffconsultancy.com/products/fsharp_journal/?e