>>>> "Raymond" == Raymond Toy
<toy(a)rtp.ericsson.se> writes:
Raymond> Which compilers do this? I know Stalin is very good, but
Raymond> it compiles to C as does gambit, so these must have the
Raymond> performance hit.
Can you really call what `gambit' creates "C"? Wow. It's *not*
readable by mortal humans.
Raymond> I understand the desire and need for tail-recursive
Raymond> algorithms, and I think we should strive to have it.
Of course. "Tail recursion wasn't invented in vain."
Compare:
(while listvar
(myfunction (car listvar))
(setq listvar (cdr listvar)))
(let loop ((listvar listvar))
(myfunction (car listvar))
(loop (cdr listvar)))
... they look close to the same to me. Will someone post an example
of something that named let or letrec can do more elegantly than
iterative constructions? I'm too new at this to think of any.