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
Reporting on sucess/failure of tail recursion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-12-02 (23:59)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Reporting on sucess/failure of tail recursion
On Fri, 2005-12-02 at 16:17 +0100, Jean-Christophe Filliatre wrote:
> Erik de Castro Lopo writes:
>  > with a no-recursive outer function and a tail recursive inner function.
>  > It would still be nice to know if the inner function is tail recursive.

> As  already explained by  Basile, the  right notion  is that  of "tail
> call"  not of "tail  recursive function" 

> Being warned of non-tail calls may be useful in some situations, but I
> guess the  issue is often the call  to a library function  that is not
> tail recursive. 

Hehe .. committing the same error yourself.

> That's  why you need the documentation  to be explicit
> about that...

No, it is meaningless: the idea only applies to a definition.
The only visible part of a Library function is its interface.
Furthermore, it is very unlikely a call to a library function
would be recursive, whether it is in tail position or not.

What needs to be documented for a library function is its
complexity (time/space etc). In this sense the documentation
of the C++ Standard Library should be taken as an examplar.

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net