From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 197FBBB81 for ; Sat, 3 Dec 2005 00:59:13 +0100 (CET) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jB2NxAh9018143 for ; Sat, 3 Dec 2005 00:59:12 +0100 Received: from rosella (ppp33-4.lns1.syd2.internode.on.net [59.167.33.4] (may be forged)) by smtp1.adl2.internode.on.net (8.12.9/8.12.6) with ESMTP id jB2NwnRr040104; Sat, 3 Dec 2005 10:28:54 +1030 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] Reporting on sucess/failure of tail recursion From: skaller To: Jean-Christophe Filliatre Cc: Erik de Castro Lopo , caml-list@yquem.inria.fr In-Reply-To: <17296.25990.261724.744405@gargle.gargle.HOWL> References: <20051202200957.2fb14d49.ocaml-erikd@mega-nerd.com> <55541.132.166.133.216.1133515788.squirrel@panel.lost-oasis.net> <20051202211627.128cbfc5.ocaml-erikd@mega-nerd.com> <17296.25990.261724.744405@gargle.gargle.HOWL> Content-Type: text/plain Date: Sat, 03 Dec 2005 10:58:49 +1100 Message-Id: <1133567929.17049.7.camel@rosella> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 4390DFCF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 recursion:01 filliatre:01 recursive:01 recursive:01 basile:01 wrote:01 sourceforge:01 writes:01 tail:01 tail:01 meaningless:01 guess:02 explicit:03 library:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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 Felix, successor to C++: http://felix.sf.net