>My understanding was that tail recursion ( or its optimized implementation )
>gives a (properly written) recursive program the efficiency of an
>iterative program.

Yes, because such implementations avoid "real" recursion, i.e. when they
encounter tail recursive function calls they do not push some kind of
return address on a stack. Of course, such an implementation of tail
recursion is desirable, but it is iteration, in fact.

I just wanted to point out that recursion generally is not a benefit at
all. It is also no special sign of functional programming languages, you
can do recursion in most imperative languages as well. The good thing about
functional programming languages is merely the fact that symbols are
evaluated regardless wether they're bound to data or to a function. This
allows high level of data and functional abstraction without having to
extend the core language.

BTW, with trow and catch it should theoretically be possible to implement
multitasking. Does anybody know how the "evaluation loop" at top level of
REBOL works? (not that I want to implement multitasking, that's far beyond
my capabilities, I'm just curious...)

Greetings,

Erich


Reply via email to