Hi Thorsten,

>>> The notion of 'tail-recursion' does not have any meaning in an
>>> interpreted language like PicoLisp, since its only for compiler
>>> optimizations -right?
>> I think you are confusing the terms.  What you are probably after is
>> called tail call optimisation (TCO), which is an optimisation that can
>> be applied to tail calls.
> tail-recursion is definitely one way to name it, there are a lot of
> usage examples around, e.g.
> ,--------------------------------------------------
> | http://www.haskell.org/haskellwiki/Tail_recursion
> `--------------------------------------------------
> but TCO might be a more accurate term, or lets put it like this - many
> books about compiled languages state that tail-recusrion is important
> because it enables TCO. 

no, TCO itself is not about recursion.  TCO can be applied even to
non-recursive code.  You could put it the other way round, TCO makes
tail-recursive code more space efficient by reusing stack frames instead
of growing the stack.


UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to