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-02 (12:05)
From: Andreas Rossberg <AndreasRossberg@w...>
Subject: Re: [Caml-list] List.rev
skaller <skaller@users.sourceforge.net> wrote:
> There are better ways to write specifications
> that (a) refer to an implementation that isn't exhibited
> and (b) assume tail-rec implies no stack allocation
> The first is called 'ill formed formula', and
> the second is called 'unwarranted assumption'.
> So the spec is (a) meaningless gibberish
> and (b) even if the implementation were exhibited
> it says nothing about the performance.
> Yet it is easy enough to say
> O(n) time and O(1) stack

Sorry, but isn't talking about a stack even less meaningful
implementation-driven "gibberish"? Usually, a functional language definition
does not mention anything like a stack. In fact, some major FP
implementations don't even use a stack.

Tail recursion at least is a clear syntactic property that can be defined
without referring to implementation techniques. That a tail-recursive
function uses constant space is then a well-understood QOI issue. No serious
FP implementation would dare not to meet this criterion.


  - Andreas

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