English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
cost to let rec?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-11-10 (17:16)
From: Andrej Bauer <Andrej.Bauer@f...>
Subject: Re: [Caml-list] cost to let rec?
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.