GNU bug report logs - #30458
hash table reverse-lookup (get-keys VALUE TABLE) => KEYS

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 14 Feb 2018 17:42:02 UTC

Severity: wishlist

Found in version 26.0

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Andy Moreton <andrewjmoreton <at> gmail.com>, "30458 <at> debbugs.gnu.org" <30458 <at> debbugs.gnu.org>
Subject: bug#30458: [External] : Re: bug#30458: hash table reverse-lookup (get-keys VALUE TABLE) => KEYS
Date: Thu, 12 Aug 2021 15:08:01 +0000
> > Still, I would ask to have general reverse-lookup functions
> > for a hash table, as well.  Would someone please retitle this
> > bug for that?
> 
> We have this now in the form of `map-filter' (and friends),
> so I'm closing this bug report.

It's fine that we have `map-filter' and friends.
But that doesn't really help very directly, or in
terms of discoverability.  It's easy to discover
`rassoc', given `assoc' (e.g., just use `apropos',
or look up `assoc' in the manual, or just look up
"association list").

Being able to realize this functionality "in the
form of `map-filter' (& friends)" isn't so helpful.

And has the _doc about hash tables_ been updated
to indicate just how to do a reverse lookup?

Node `Association Lists' of the Elisp manual tells
you about `assoc', `rassoc', and `assq' (and more)
together.  Why?  Because their doc belongs together.

If a similar/equivalent treatment hasn't been done
for hash tables - provide a direct function and fix
the doc - then I don't consider this bug to have
been fixed.  Instead, in that case it's just another
"won't fix".

The aim shouldn't be to find a reason to close bug
reports.  The aim should be to fix bugs.  If the bug
was really fixed, then thanks!  If not, no thanks.

Saying that one can program using this, that, and
the other thing (XYZ "and friends") to work around
the lack of some feature is no replacement for
providing that missing feature directly.

`rassoc' and `rassq' have been in Lisp since about
Day One.  There's a reason for that.




This bug report was last modified 3 years and 280 days ago.

Previous Next


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