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 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 7DD5ABC6B for ; Sat, 10 Nov 2007 18:16:31 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFt2NUfAXQInh2dsb2JhbACPAgEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.21,399,1188770400"; d="scan'208";a="5653685" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 10 Nov 2007 18:16:31 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id lAAHGU21007999 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 10 Nov 2007 18:16:30 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAPF1NUfBAkMt/2dsb2JhbAA X-IronPort-AV: E=Sophos;i="4.21,399,1188770400"; d="scan'208";a="19141863" Received: from vega.fmf.uni-lj.si (HELO postar.fmf.uni-lj.si) ([193.2.67.45]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Nov 2007 18:16:30 +0100 Received: from localhost (unknown [192.168.5.1]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id CB2271D4134 for ; Sat, 10 Nov 2007 18:16:28 +0100 (CET) X-Virus-Scanned: amavisd-new at spam.fmf.uni-lj.si Received: from postar.fmf.uni-lj.si ([192.168.5.5]) by localhost (spam.fmf.uni-lj.si [192.168.5.1]) (amavisd-new, port 10024) with ESMTP id XR5wFRVFu2ds for ; Sat, 10 Nov 2007 18:16:28 +0100 (CET) Received: from [192.168.1.101] (BSN-77-148-136.static.dsl.siol.net [193.77.148.136]) (Authenticated sender: bauer) by postar.fmf.uni-lj.si (Postfix) with ESMTP id A1D531D4020 for ; Sat, 10 Nov 2007 18:16:27 +0100 (CET) Message-ID: <4735E76A.908@fmf.uni-lj.si> Date: Sat, 10 Nov 2007 18:16:26 +0100 From: Andrej Bauer Reply-To: Andrej.Bauer@andrej.com User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: Caml List Subject: Re: [Caml-list] cost to let rec? References: <71767b800711091320h5d14afb8qc614fb4f1951ed06@mail.gmail.com> In-Reply-To: <71767b800711091320h5d14afb8qc614fb4f1951ed06@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4735E76E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrej:01 andrej:01 wrote:01 rec:01 rec:01 compile:01 caml-list:01 defining:02 slightly:03 bugs:03 debugging:03 maintainance:03 let:03 let:03 laziness:05 Ralph Douglass wrote: > Is there any cost to defining a function with "let rec" instead of just > "let"? A slightly longer compile time or something? I'm just curious. The main cost of using "let rec" instead of "let" out of laziness or "convenience" is time spent debugging the resulting bugs and the extra time needed for software maintainance ("WTF did this Ralph guy write let rec everywhere? My god he's totally incompetent and I have to clean up."). This typically costs far, far more than any processor time you might gain. Source code is for humans. Andrej