From: Josh <josh@foxtail.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Daniel Colascione <dancol@dancol.org>,
Bozhidar Batsov <bozhidar@batsov.com>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: Consider adding hash-keys and hash-values
Date: Fri, 1 Nov 2013 20:05:45 -0700 [thread overview]
Message-ID: <CANdFEAH_RxD0gX3PC5TToSD65Yds080hauenB2KEg8PhYrzUkQ@mail.gmail.com> (raw)
In-Reply-To: <jwvmwlqvs3o.fsf-monnier+emacs@gnu.org>
On Wed, Oct 30, 2013 at 6:11 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>>> (defun hash-keys (hashtable)
>
> It would have to be "hash-table-keys".
>
> But again, I'm not sure it provides a useful enough abstraction to
> justify adding this one-liner in every Emacs executable.
>
> Tho, maybe we could introduce a new file "oneliners.el" where we could
> collect such functions (probably most/all defined as `defsubst' so that
> you can (eval-when-compile (require 'oneliners)).
In my experience the usual reason to want a set of hash table keys
or values is to iterate over them. Perhaps this would be a good
time to revisit last year's discussion[0] of Daniel's elisp-generators
library[1]?
[0] http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00502.html
[1] https://github.com/dcolascione/elisp-generators
Josh
prev parent reply other threads:[~2013-11-02 3:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 14:16 Consider adding hash-keys and hash-values Bozhidar Batsov
2013-10-30 9:36 ` Bozhidar Batsov
2013-10-30 11:06 ` Nathan Trapuzzano
2013-10-30 13:11 ` Stefan Monnier
2013-10-31 12:55 ` Bozhidar Batsov
2013-10-31 13:37 ` Stefan Monnier
2013-11-02 15:27 ` Bozhidar Batsov
2013-11-03 2:38 ` Leo Liu
2013-11-03 7:28 ` Bozhidar Batsov
2013-11-04 5:14 ` Leo Liu
2013-11-03 14:00 ` Stefan Monnier
2013-11-04 11:47 ` Bozhidar Batsov
2013-11-02 3:05 ` Josh [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANdFEAH_RxD0gX3PC5TToSD65Yds080hauenB2KEg8PhYrzUkQ@mail.gmail.com \
--to=josh@foxtail.org \
--cc=bozhidar@batsov.com \
--cc=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).