GNU bug report logs - #34708
alist-get has unclear documentation

Previous Next

Package: emacs;

Reported by: "Miguel V. S. Frasson" <mvsfrasson <at> gmail.com>

Date: Sat, 2 Mar 2019 04:52:01 UTC

Severity: minor

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

Full log


Message #104 received at 34708 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Eric Abrahamsen <eric <at> ericabrahamsen.net>, 34708 <at> debbugs.gnu.org
Subject: Re: bug#34708: alist-get has unclear documentation
Date: Tue, 12 Mar 2019 18:45:40 +0100
Drew Adams <drew.adams <at> 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.




This bug report was last modified 6 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.