help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: tail call reduction


From: Stefan Monnier
Subject: Re: tail call reduction
Date: Thu, 10 Feb 2005 09:56:55 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> My main pet Emacs Lisp programming project involves both a lot of
> parsing and recursively descending of tree-like data structures.

Can you give a short description of one such case where you've bumped
into problems.  After all, the lack of tail-recursion should only be
a problem when you implement loops by recursive calls, but unless your tree
data-structures are very deep, normal recursion should fine.

> But, alas, unless I am much mistaken, proper tail recursion is simply
> impossible in a dynamically scoped environment.  I could reduce byte

I recommend you check out the lexbind branch which introduces static scoping
(it still provides dynamic scoping as well, but it should allow tail-call
elimination in most simple cases).


        Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]