From: Mark Oteiza <mvoteiza@udel.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 1b4442b: Don't expand body inside a let-binding when there are no bindings
Date: Thu, 16 Feb 2017 23:44:22 -0500 [thread overview]
Message-ID: <878tp58lzt.fsf@holos> (raw)
In-Reply-To: <jwvtw7umfqk.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Thu, 16 Feb 2017 08:32:06 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> + (if vars
>> + `(let ,(mapcar (lambda (b) (list (car b) (cdr b))) vars)
>> + ,@code)
>> + `(progn ,@code)))
>
> Just curious here:
>
> I resisted the temptation to do that when working on that code because
> I thought that it should (both in the sense that I expect the current
> code to behave that way, and in the sense that if it doesn't behave that
> way, we should fix it) make no difference to the byte-code we generate.
>
> So, I'm wondering if you've found a concrete case where it makes
> a difference, or it's just that you wanted the output to look
> more pretty.
Nope, AFAICT the bytecode remains the same.
In the past I noticed that pcase expanded things to (let nil ...), which
I think is a bit annoying wrt readability, yes; however just recently I
was poking at elint.el, which complains about such forms with
Empty varlist in let: (let nil <snip>)
so I was more inclined to change it.
Between vars possibly being expensive, and--one step beyond that--using an
uninterned symbol to ameliorate evalling vars twice incurring a cost
with dynamic binding, I suppose this change was short sighted.
next prev parent reply other threads:[~2017-02-17 4:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170216014306.20854.5128@vcs0.savannah.gnu.org>
[not found] ` <20170216014308.12DC326007@vcs0.savannah.gnu.org>
2017-02-16 13:32 ` [Emacs-diffs] master 1b4442b: Don't expand body inside a let-binding when there are no bindings Stefan Monnier
2017-02-17 4:44 ` Mark Oteiza [this message]
2017-02-18 0:05 ` Stefan Monnier
2017-02-18 0:10 ` Mark Oteiza
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=878tp58lzt.fsf@holos \
--to=mvoteiza@udel.edu \
--cc=emacs-devel@gnu.org \
--cc=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.