Hello [EMAIL PROTECTED]
On 26-Nov-99, you wrote:
>> Was it Ingo who mentioned that tail recursion had been removed from the
>> current REBOL implementation and asked when it would be returned? That
>> should take care of the stack overflow problem. The problem is a result
>> of an incomplete implementation of REBOL (missing tail recursion) and I
>> don't think it makes a good argument regarding the degree to which REBOL
>> supports functional programming.
>>
>> Elan
>
> If I've comprehended that correctly, a good language should eliminate tail
> recursion and replace it by iteration. This is a feature of most
> CommonLISP systems and Scheme.
Well, that would probably require some static analysis of the REBOL program,
something which is probably not part of the philosophy of the REBOL
interpreter. (Am I mistaken?)
> After all, recursion is more expensive than iteration and should be
> avoided whenever possible, and its always possible if the function calls
> are proper tail-recursive.
Except when it makes the code more readable, thus more maintainable.
Though, taking a step back and comparing procedural and functional
programming, I think the main point is that procedural programming is nice
seen from the user's perspective (as it will almost certainly result in
faster and less memory-hungry programs), while functional programming is
nice seen from a programmer's perspective (as it makes aestethically
beautiful code).
Though, users will of course benefit from a functional approach if it means
less buggy code and more maintainable code. Which it often will.
But I digress. Sorry. The bottom line: I think we can all agree that tail
recursion would be a nice thing to get back.
Regards
Ole