[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tail call vs debugging

I think asking for non-tail-recursion to be the default in a Scheme
language for reasons based n maintaining debugging information is
off base. For production quality code, you presume your code to be
correct and you compile it accordingly, paying as little bookkeeping
overhead as required.

To say that you dont want Scheme to require tail-recursion is, to me,
saying that you always want it to pay bookkeeping overhead even if
you are not in debugging mode (you, not your implementation). This
is unreasonable considering you can easily force a tail-recursive
call to be non-tail-recursive by wrapping it in a trivial LET (or if
your compiler optimizes this, by placing a DISPLAY/FORMAT/PRINTF
statement after it).

Would you also argue that every procedure defined should implicitly
be wrapped in a TRACE since this information too is useful for

To me, your concern for tracing information is an important one
which should be supported by a language. I just don't think it
should be the default, to the exclusion of tail-recursion. If
you're debugging then debug, but if not don't take the performance