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.

There are interpreters that require TCO, e.g. PostScript.  In my
JavaScript implementation of PostScript
<http://logand.com/sw/wps/index.html>, I used trampoline to implement it
http://logand.com/picowiki.html#sec-14 and optimize stack growth.  As
shown in the examples, one can use the technique in PicoLisp too,
althought it doesn't compose well.

Cheers,

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

Reply via email to