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

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

bug#34708: alist-get has unclear documentation


From: Michael Heerdegen
Subject: bug#34708: alist-get has unclear documentation
Date: Tue, 12 Mar 2019 18:45:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> Why have REMOVE instead of just letting users
> set the value (explicitly) to DEFAULT?

That's the default behavior without using REMOVE.  Removing associations
is also a valid use case and in my eyes still consistent with the place
semantics.

> That would really follow "the expected semantics of setf", with
> nothing funny going on, no confusion.
>
> `alist-get' is a function, not just a gv place.  Argument REMOVE makes
> no sense for the function (does it?).  All the other args do make
> sense for the function.  Shouldn't all of the args to a function make
> sense for it?  Should we add args that are only used by `setf'?  Has
> that been done before?

Ok, REMOVE is more or less your only criticism.  I too find it a bit
odd, especially the additional argument, but not too odd and useful
enough to keep it.  It's very debatable, agreed.


Michael.





reply via email to

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