help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `apply-partially` and hash tables


From: Stefan Monnier
Subject: Re: `apply-partially` and hash tables
Date: Sun, 20 Oct 2024 16:29:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]