From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: `apply-partially` and hash tables
Date: Sun, 20 Oct 2024 16:29:10 -0400 [thread overview]
Message-ID: <jwvplnu5xjt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: m1ed4a6126.fsf@constantly.at
Rudolf Schlatte [2024-10-20 21:12:33] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> My question is the same, though: can it be relied upon?
>>
>> It's fundamental to the notion of what is a *value* (as in "call by
>> value"), so yes, very much so.
>
> The usual caveat for lists applies: prepending values to the front or
> otherwise mutating the list will not work as expected in general, since
> what you're holding is just a cons cell. (This is an instance of the
> "delete bug" where you have to write `(setq x (delete 'foo x))' instead
> of just `(delete 'foo x)'.)
AFAICT this behavior is a direct result of that same fundamental
difference between a value and the thing it refers to, so not a caveat
at all.
Stefan
prev parent reply other threads:[~2024-10-20 20:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-20 9:43 `apply-partially` and hash tables Joost Kremers
2024-10-20 9:54 ` tomas
2024-10-20 14:46 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-10-20 15:19 ` Joost Kremers
2024-10-20 17:04 ` Stefan Monnier
2024-10-20 19:12 ` Rudolf Schlatte
2024-10-20 20:29 ` Stefan Monnier via Users list for the GNU Emacs text editor [this message]
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=jwvplnu5xjt.fsf-monnier+emacs@gnu.org \
--to=help-gnu-emacs@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.