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
[Caml-list] "List.index" or "List.unique" functions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-01 (05:13)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] List.rev
On Sat, 2004-05-01 at 14:38, brogoff@speakeasy.net wrote:
> On Fri, 1 May 2004, skaller wrote:
> > BTW: documentation that says a function is 'tail recursive'
> > is misguided. That's an implementation detail of no
> > possible use to a user of the function. The user may
> > benefit from knowing the complexity of the function
> > in terms of speed and auxilliary storage required.
> You couldn't be more wrong.

Due respect but I am quite correct and provably so.

Tail-rec is a property of an actual function implementation.

The term has no meaning without exhibiting implementation
code, and it is usual for libraries to quite pointedly
NOT do that: instead the behaviour is specified in
terms of input and output of the function, and also
side effects in terms of time and storage requirements
are sometimes thrown in for more detail.

Saying tail-rec is suggestive only if you have
an implementation in your minds-eye.

It is good the documentation says the function
is tail-rec, this is better than no performance


John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners