From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA15657; Sun, 8 Jun 2003 10:49:48 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA15593 for ; Sun, 8 Jun 2003 10:49:47 +0200 (MET DST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h588njT24828 for ; Sun, 8 Jun 2003 10:49:46 +0200 (MET DST) Received: (qmail 51423 invoked from network); 8 Jun 2003 08:49:44 -0000 Received: from arda.pair.com (HELO checkerdell.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 8 Jun 2003 08:49:44 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030608014051.03139b88@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Sun, 08 Jun 2003 01:49:21 -0700 To: Pierre Weis , Oleg Trott From: Chris Hecker Subject: Re: easy print and read (was: [Caml-list] Why are arithmetic functions not polymorph?) Cc: John Max Skaller , "caml-list@inria.fr" In-Reply-To: <20030606124626.A27959@pauillac.inria.fr> References: <200306060308.42724.oleg_trott@columbia.edu> <3EDC152C.5070906@ozemail.com.au> <200306060308.42724.oleg_trott@columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam: no; 0.00; hecker:01 checker:01 caml-list:01 pierre:01 weis:01 generics:01 generic:01 inlining:01 floats:01 statically:01 runtime:01 compiler:01 chris:01 ints:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk At 12:46 PM 6/6/2003 +0200, Pierre Weis wrote: >All this hard work needed a long time to mature (1995 -> 2003!) and is >now in a stable and satisfying state. This is great. My concern about generics in ocaml is one of efficiency. I read the paper (as much as I could understand), and the flow array stuff seems smart and better than type pattern matching in the case where you don't know the definition of the generic function at the call point, but is there going to be inlining with generics as well in this initial implementation? In other words, if I want to define (+) for ints and floats, and I statically know the type at the point of call, will the compiler inline the add_int or add_float appropriately and do no runtime checks (or flow array traversals)? For generics to be really useful for fine grained math operations (one of the better applications of overloading (especially in ocaml since the op. thing is so ugly), in my opinion) I think this is going to be necessary. Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners