[Top][All Lists]

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

Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Docu

From: Eli Zaretskii
Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'.
Date: Tue, 19 Jan 2016 20:32:53 +0200

> From: Michael Heerdegen <address@hidden>
> Cc: address@hidden, Stefan Monnier <address@hidden>
> Date: Tue, 19 Jan 2016 19:01:30 +0100
> > I don't know -- should we?  I didn't find any other function for which
> > we say something like that, so saw no reason to single this one out.
> I think setf'ing alist-get is the preferred way now to change the value
> associated to a key.  If it is, it should be discoverable in some way,
> because it is an important functionality.  Unlike other functions that
> are setf'able, in this case we have no equivalent setter function
> defined, i think.

Isn't 'cdr' also in that class?  As well as at least a few others?

AFAIU, this function just saves you from the need to repeatedly test
the value returned by assq before using it, that's all.  I don't see
what's so exciting about that.  We have similar tricks, some of them
gems, all over the place, and there's no practical way we could make
them stand out enough, not when we have almost 2000 functions, macros,
and special forms documented in the manual (and many more not
documented).  The only way is for people to read well-written code and
learn.  No manual can ever replace that.

> I think the docstring should be improved.  AFAICT the REMOVE arg makes
> only sense when using the function with a gv setter.

For the record, that doc string almost made me weep in frustration --
about my own stupidity, no doubt, since I couldn't make heads or tails
out of it, when I compared it with the actual code (including studying
the _only_ use of it in the context of a gv setter, AFAICT).

reply via email to

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