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

Tail Recursion

    Date: Wed, 22 Feb 89 17:51 EST

		  Two that come to mind immediately are unwind-protects
    and stack-consed-presentation cleanups.

Stack-cons and unwind-protect merely forbid tail-recursive folding, just
like any other piece of recursive-but-not-tail-recursive code.

However it would probably break encapsulations (e.g. advise).  How could
you tell an encapsulated tail-recursive function not to be
tail-recursive any more?

    Also, how do you set the trap-on-exit flag on one (but not several)
    of these tail-recursively called frames?

That's what "makes debugging hard" means.  You don't see old stack
frames, hence no args or locals and no frame to mark.