all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Nicolas Petton <nicolas@petton.fr>,
	28753@debbugs.gnu.org,
	Noam Postavsky <npostavs@users.sourceforge.net>
Subject: bug#28753: 25.3; Functions to get alist from hash table and vice versa
Date: Sat, 30 Dec 2017 20:40:25 +0000	[thread overview]
Message-ID: <CAArVCkQ-fs2CBPgms6UbArmbPOECv2fPegMMjD3V9YnS+K3wSQ@mail.gmail.com> (raw)
In-Reply-To: <87d14uusjn.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

Michael Heerdegen <michael_heerdegen@web.de> schrieb am Di., 7. Nov. 2017
um 14:29 Uhr:

> Noam Postavsky <npostavs@users.sourceforge.net> writes:
>
> > Drew Adams <drew.adams@oracle.com> writes:
> >
> > > Any news on this?  There is no general, abstract
> > > solution proposed, so far, to meet the needs met
> > > by the specific alist <-> hash-table code I sent.
> >
> > Did you have any comments for my proposal in #29?
>
> That's clever.
>
> OTOH I'm not convinced that `map-into' is a good abstraction.  Every
> goal type might have an individual set of useful parameters, especially
> when we want to add support for other map types in the future.  Our
> choice now to unite those in one conversion interface function might
> result in quite a mess later.
>

I don't think a unified conversion interface is that important. The various
structures used for mappings are just too different. For example, alists
and plists aren't real types, they are only defined by their usage. Hash
tables, on the other hand, are real types, with a per-object comparison
function, a non-nil empty value, etc. These two kinds of objects are just
too different to treat uniformly. Also, in most cases it is statically
known which kinds of objects are involved, so a generic function that
dynamically selects on the type of object isn't that useful. How about
adding some simple conversion functions to subr.el such as
(defun alist-to-hashtable (alist &rest keys) ...)
(defun hashtable-to-alist (hashtable) ...)

[-- Attachment #2: Type: text/html, Size: 2055 bytes --]

  reply	other threads:[~2017-12-30 20:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09  0:25 bug#28753: 25.3; Functions to get alist from hash table and vice versa Drew Adams
2017-10-09 13:20 ` Michael Heerdegen
2017-10-09 14:11   ` Drew Adams
2017-10-11 16:42     ` Drew Adams
     [not found]       ` <87wp4038m0.fsf@web.de>
2017-10-12 13:27         ` Nicolas Petton
2017-10-12 13:46           ` Michael Heerdegen
2017-10-12 14:36           ` Drew Adams
2017-11-06 16:19             ` Drew Adams
2017-11-07  0:46               ` Noam Postavsky
2017-11-07  2:24                 ` Drew Adams
2017-11-07  2:51                   ` Noam Postavsky
2017-11-07 13:28                 ` Michael Heerdegen
2017-12-30 20:40                   ` Philipp Stephani [this message]
2017-12-30 21:08                     ` Drew Adams
2017-12-30 21:15                       ` Philipp Stephani
2017-10-12 15:56           ` Noam Postavsky
2017-10-12 13:30       ` Nicolas Petton
2022-04-22 13:18   ` Lars Ingebrigtsen
2022-04-22 15:21     ` Drew Adams
2017-12-30 21:26 ` Philipp Stephani
2017-12-31  0:01   ` Drew Adams
2018-03-04 19:17     ` Philipp Stephani
2018-03-05  0:01       ` Drew Adams

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=CAArVCkQ-fs2CBPgms6UbArmbPOECv2fPegMMjD3V9YnS+K3wSQ@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=28753@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=nicolas@petton.fr \
    --cc=npostavs@users.sourceforge.net \
    /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.