Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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