[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: `macro-eval'
From: |
Richard Stallman |
Subject: |
Re: RFC: `macro-eval' |
Date: |
Thu, 31 Aug 2006 03:33:34 -0400 |
I wrote a macro to automatically generate the boilerplate "delayed
evaluation with uninterned symbol" code needed in many macros (and
described at (elisp)Surprising Local Vars), which I present for comment.
Actually we recently decided to stop using that method for two
important macros, dotimes and dolist, because it turns out to be
rather wasteful to generate all those symbols. We concluded that it
is better, overall, to use an interned symbol so that only one symbol
would be needed. We gave the interned symbol a name that users will
tend not to use.
Maybe that means we should change the recommendations in the Lisp
Manual. However, for other macros that are used less often, the
recommendation there may still be best.
In many other Lisp implementations the compiler would get rid of such
variables, so the recommended technique costs nothing. But the Emacs
Lisp byte compiler can't do that, because Emacs bytecode has no
anonymous stack slots.
As far as my testing shows, it works both in interpreted and compiled
environments, with the one caveat that, as it uses `progv', it both
requires the cl library at runtime
That is a fatal flaw for this implementation.
- RFC: `macro-eval', Stuart D. Herring, 2006/08/30
- Re: RFC: `macro-eval',
Richard Stallman <=