Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
From: Andreas Rossberg <AndreasRossberg@w...>
Subject: Re: [Caml-list] List.rev
skaller <> 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 Archives:
Bug reports: FAQ:
Beginner's list: