From: Michael Heerdegen <michael_heerdegen@web.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: Okamsn <okamsn@protonmail.com>,
"50927@debbugs.gnu.org" <50927@debbugs.gnu.org>
Subject: bug#50927: [External] : bug#50927: Considering only entries with unique keys in map.el?
Date: Fri, 01 Oct 2021 04:17:12 +0200 [thread overview]
Message-ID: <87ee958p5j.fsf@web.de> (raw)
In-Reply-To: <SJ0PR10MB5488B539F2DE97A7CB97B749F3AB9@SJ0PR10MB5488.namprd10.prod.outlook.com> (Drew Adams's message of "Fri, 1 Oct 2021 01:56:10 +0000")
Drew Adams <drew.adams@oracle.com> writes:
> > entry with the same key. This is a misleading behavior.
>
> Actually, it's a handy behavior. It's one of the main ideas behind
> alists. You can just remove or skip the first match of a given key to
> restore or use the next one.
I tend to agree. And it's easy to avoid duplicate entries - they
are not introduced when using the map.el functions the right way.
OTOH: the map looping or do- tools also useful for inspecting duplicates
- this is useful. Avoiding duplicates would also mean O(n^2) equality
tests per map - right?
Michael.
next prev parent reply other threads:[~2021-10-01 2:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 0:55 bug#50927: Considering only entries with unique keys in map.el? Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-01 1:56 ` bug#50927: [External] : " Drew Adams
2021-10-01 2:17 ` Michael Heerdegen [this message]
2021-10-01 12:48 ` Lars Ingebrigtsen
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=87ee958p5j.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=50927@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=okamsn@protonmail.com \
/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.