From: Dmitri Paduchikh <dpaduchikh@gmail.com>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: emacs-devel@gnu.org
Subject: Re: need for 'dynamical-let'?
Date: Fri, 24 Jul 2015 21:54:13 +0500 [thread overview]
Message-ID: <876159wl6y.fsf@gmail.com> (raw)
In-Reply-To: <861tfyegrg.fsf@stephe-leake.org> (Stephen Leake's message of "Thu, 23 Jul 2015 15:54:59 -0500")
Stephen Leake <stephen_leake@stephe-leake.org> writes:
SL> Can we define a macro 'dynamical-let' that would implement this
SL> pattern, but with hidden variables?
Not sure about pattern with hidden variables, but `dynamical-let' which
would always establish dynamic binding will be useful for writing macros.
Currently, if I understand right, expansion of the macro
(defmacro foo ()
'(let ((some-variable t))
(bar)))
is treated differently depending on the current value of `lexical-binding':
the macro will create lexical binding where this variable is t, and dynamic
binding otherwise. This is bad as it can easily introduce unintended
behavior changes to code. `dynamical-let' would provide some control to
macro writers. Natively supported `lexical-let' would be also good to have.
But may be give them somewhat shorter names.
next prev parent reply other threads:[~2015-07-24 16:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 20:54 need for 'dynamical-let'? Stephen Leake
2015-07-23 20:58 ` Stephen Leake
2015-07-23 21:03 ` Dmitry Gutov
2015-07-24 8:16 ` Stephen Leake
2015-07-24 9:38 ` Dmitry Gutov
2015-07-24 4:23 ` Stephen J. Turnbull
2015-07-24 4:40 ` David Kastrup
2015-07-24 7:58 ` Stephen Leake
2015-07-24 16:54 ` Dmitri Paduchikh [this message]
2015-07-25 6:41 ` Dmitri Paduchikh
2015-07-25 22:22 ` Stefan Monnier
2015-07-26 0:02 ` Dmitri Paduchikh
2015-07-26 6:51 ` Stefan Monnier
2015-07-26 8:17 ` Dmitri Paduchikh
2015-07-26 15:37 ` raman
2015-07-24 23:32 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=876159wl6y.fsf@gmail.com \
--to=dpaduchikh@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=stephen_leake@stephe-leake.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).