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 444C1BC69 for ; Fri, 9 Mar 2007 11:31:34 +0100 (CET) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l29AVXEt018252 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 9 Mar 2007 11:31:34 +0100 Received: from [80.229.56.224] (helo=beast.local) by ptb-relay02.plus.net with esmtp (Exim) id 1HPcKk-0000HP-MV for caml-list@yquem.inria.fr; Fri, 09 Mar 2007 10:28:24 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Interactive technical computing Date: Fri, 9 Mar 2007 10:22:27 +0000 User-Agent: KMail/1.9.5 References: <1173356534.8655.6.camel@localhost.localdomain> <200703081934.07403.jon@ffconsultancy.com> <20070308.213407.67921622.Christophe.Troestler+ocaml@umh.ac.be> In-Reply-To: <20070308.213407.67921622.Christophe.Troestler+ocaml@umh.ac.be> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703091022.27641.jon@ffconsultancy.com> X-Miltered: at discorde with ID 45F13785.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 troestler:01 vectors:01 matrices:01 annotations:01 overloading:01 camlp:01 compiler:01 ocaml:01 ocaml:01 frog:98 wrote:01 caml-list:01 arithmetic:01 expression:02 On Thursday 08 March 2007 20:34, Christophe TROESTLER wrote: > Of course, when mixing vectors and matrices, we will not be able to > stay with only + and * but I am not sure that having to put type > annotations will compare favorably to put the expression in Mat.(...) > and inventing a _few_ additional operators. Many arithmetic expressions mix different types. > Moreover I think that, in some respects, it is even better than > overloading! For example if you write > > # Vec.(a + b + c) > > then Camlp4 could generate code that only needs to create 1 temporary > vector to hold the result instead of 2 (as is the case in F#). I would expect the compiler to automate that deforesting. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists