all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 35206@debbugs.gnu.org
Subject: bug#35206: [PATCH] Misleading `list-get' argument description
Date: Tue, 09 Apr 2019 14:00:29 +0300	[thread overview]
Message-ID: <83ef6b78aa.fsf@gnu.org> (raw)
In-Reply-To: <77179D00-DAC7-41E9-BC76-4F0824DC57EF@acm.org> (message from Mattias Engdegård on Tue, 9 Apr 2019 12:34:09 +0200)

> From: Mattias Engdegård <mattiase@acm.org>
> Date: Tue, 9 Apr 2019 12:34:09 +0200
> 
> The doc string for `list-get' says
> 
>   Use TESTFN to lookup in the alist if non-nil.  Otherwise, use `assq'.
> 
> which is misleading since it's an equality predicate, not a look-up function, and the default is `eq', not `assq'.
> How about changing it to
> 
>   Equality is defined by TESTFN or by `eq' if nil or omitted.

IMO, this has a problem similar to the original text: it has nothing
to "connect" it to the main part of the doc string, which is this:

  Return the value associated with KEY in ALIST.

Neither "look up" nor "equality" is directly and obviously related to
"associated with".  E.g., you probably like "equality" better because
your mental model of "associated with" is a test for equality;
however, someone else might prefer the current text because they think
of "looking up" in the same situation.  But the text doesn't make the
relation explicit, and that is IMO its main problem.

Can you think of a change that would resolve this problem?

Thanks.





  reply	other threads:[~2019-04-09 11:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 10:34 bug#35206: [PATCH] Misleading `list-get' argument description Mattias Engdegård
2019-04-09 11:00 ` Eli Zaretskii [this message]
2019-04-09 11:26   ` Mattias Engdegård
2019-04-09 11:45     ` Mattias Engdegård
2019-04-09 14:41       ` Eli Zaretskii
2019-04-09 14:59         ` Mattias Engdegård

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=83ef6b78aa.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=35206@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    /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.