all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: tail call reduction
Date: Thu, 10 Feb 2005 09:56:55 -0500	[thread overview]
Message-ID: <87psz831tp.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 87k6pgwy7u.fsf@ID-87814.user.uni-berlin.de

> 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

  parent reply	other threads:[~2005-02-10 14:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-10  9:39 tail call reduction Oliver Scholz
2005-02-10 10:21 ` Oliver Scholz
2005-02-10 14:56 ` Stefan Monnier [this message]
2005-02-10 22:45   ` Oliver Scholz
2005-02-11  4:50     ` Stefan Monnier
2005-03-02 16:20     ` David Combs
2005-03-02 18:06       ` Oliver Scholz
2005-03-04  0:15         ` Miles Bader
     [not found]         ` <mailman.2542.1109897787.32256.help-gnu-emacs@gnu.org>
2005-03-04  0:56           ` Johan Bockgård
2005-03-04 14:01             ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87psz831tp.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.