From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 5774BBC8C for ; Sun, 13 Feb 2005 03:24:46 +0100 (CET) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1D2OgMq015477 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 13 Feb 2005 03:24:44 +0100 Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.13.1/8.13.1) with ESMTP id j1D2OEEV012492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 Feb 2005 20:24:17 -0600 (CST) Date: Sat, 12 Feb 2005 20:27:56 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Michael Walter Cc: skaller , Jon , Subject: Re: [Caml-list] The boon of static type checking In-Reply-To: <877e9a17050212145737cc30d6@mail.gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 420EBA6A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 compiler:01 compiler:01 inlining:01 compilers:01 gcc:01 ocaml:01 gcc:01 ocaml:01 definately:01 functions:01 functions:01 inline:01 inline:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Sat, 12 Feb 2005, Michael Walter wrote: > > And I disbeleive the "makes it easier with large programs" statement. > I was talking about that it's easier to write a > 1,000,000 line > program (possibly partially) with GC than without GC. OK. I misunderstood you. Sorry. > > Very small functions, yes. But it's less of an optimization than people > > think, and (especially in C++) it gets way overused. > I don't think so. From my experience basically noone is using > __forceinline except for "very small functions" (on a probably mislead > attempt to outsmart the compiler), and everyone lets the compiler > decide which functions to inline. You've had better experiences that I have, obviously. I've met one too many programmers who said, in effect, "inlining a function makes it go faster, so I try to inline lots of my functions!" > > What I'm saying is that choosing a language is a tradeoff, and the > kind of tradeoff C++ gives you can be a very good one (if not the > best) for particular problem domains. You can see evidence for such a > domain in the time spent on improving already very good compilers :-) > Actually, most of the time was spent improving the C compiler. And, inthe case of Intel, IBM, etc., the Fortran compiler (less so with GCC). The C++ compiler got brought along for the ride. There are good historical reasons why Ocaml doesn't use the GCC back end, but it'd be an interesting experiment to port Ocaml to the GCC back end and see how well it'd do. Were I to write a new language, I'd definately target the GCC backend. Brian