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
tail rec
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-21 (13:30)
From: Robert Fischer <robert.fischer@S...>
Subject: Re: [Caml-list] tail rec

> I'm repeating my suggestion: extend the typing annotation (produced by -dtypes) to flag every tail recursive call, and have the emacs mode and ocamlbrowser display every tail call particularily (e.g. in a different color or font).
> This don't require any additional language construct.
Oh, then we're cool.  :-D

> Also, tail recursion is IMHO a beginner's puzzle. I'm pretty sure every experimented Ocaml programmer does know inside his code what are his tail recursive calls.
If you asked me to point them out, I could.  If you asked me if a given 
function is tail recursive, I could tell you.  I also use tail recursive 
calls unintentionally, and (while I realize now that you're not 
proposing this) I was concerned my code suddenly wouldn't compile 
because I didn't happen to tag a tail recursion.

Robert Fischer
IT Firefighter
Smokejumper Consulting