From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jose A Ortega Ruiz <jao@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quick fix for previous change
Date: Fri, 28 Jan 2022 16:16:54 -0500 [thread overview]
Message-ID: <jwva6ff602p.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87bkzva8qh.fsf@gnus.jao.io> (Jose A. Ortega Ruiz's message of "Fri, 28 Jan 2022 20:47:02 +0000")
> yes, that works, but i find it ugly to use eval explictly for the sake
> of not using "a list-that-looks-like-a-function":
To me, it's being more honest: we have a variable that holds an ELisp
expression, so we need `eval` somwehere.
> what are the downsides of the latter? i understand that i'd be just
> hiding an implicit eval, but is that all, or am i missing
> other drawbacks?
There's no serious drawback, no. Here are some minor drawbacks:
- In Common-Lisp and Scheme '(lambda () 5) does not evaluate to
something recognized as a function. Currently ELisp does, but I think
it's something better avoided. I hope in some distant future we can
make the types `function` and `cons` be a mutually-exclusive.
- the function value `(lambda () ,v) returns a function that will
evaluate v using the old dynamically-scoped dialect which we're trying
to phase out.
> (isn't, loosely speaking, hiding evals one of things macros
> buy us?
`eval` is used sometimes in macros, but most macros neither use nor hide
`eval`, AFAIK, no.
> ... the version without eval looks more readable to me).
My own taste is reflects in the fact that my local Emacs rejects
(lambda ...) as a valid function value ;-)
Stefan
next prev parent reply other threads:[~2022-01-28 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <164339989485.1614.11034229578358286224@vcs2.savannah.gnu.org>
[not found] ` <20220128195815.4DB24C423B9@vcs2.savannah.gnu.org>
2022-01-28 20:16 ` [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quick fix for previous change Stefan Monnier
2022-01-28 20:47 ` Jose A Ortega Ruiz
2022-01-28 21:16 ` Stefan Monnier [this message]
2022-01-28 23:07 ` Jose A Ortega Ruiz
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=jwva6ff602p.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=jao@gnu.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 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.