From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andrea Corallo <akrl@sdf.org>
Cc: emacs-devel@gnu.org
Subject: Re: new function proposal alist-to-hash
Date: Sat, 05 Oct 2019 11:13:31 -0400 [thread overview]
Message-ID: <jwva7aftelx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <xjfa7af61x0.fsf@sdf.org> (Andrea Corallo's message of "Sat, 05 Oct 2019 08:18:19 +0000")
> Sure, my example was just to point out easiness of use from a syntactic
> point of view. The good of having the list quoted by the user is that
> he can quasi-quote when needed what he needs.
But reading the rest of your response, it seems you're mostly interested
in the "literal" case (maybe using backquote+unquote to evaluate some
sub-elements).
> In python it would be simply something like this:
>
> nested_dict = { 'dictA': {'key_1': 'value_1'},
> 'dictB': {'key_2': 'value_2'}}
Python uses hash-tables to represent objects, whereas in Elisp this is
not the case: we use cl-defstruct, alist, or plists instead (hash-tables
are considered as relatively expensive, so if you know there will only
be a small number of entries, you're often better off with an alist).
Nested hash-tables are very rare in Elisp (so far).
Stefan
next prev parent reply other threads:[~2019-10-05 15:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 9:58 new function proposal alist-to-hash Andrea Corallo
2019-10-04 19:16 ` Stefan Monnier
2019-10-05 8:18 ` Andrea Corallo
2019-10-05 15:13 ` Stefan Monnier [this message]
2019-10-05 15:45 ` Andrea Corallo
2019-10-05 8:28 ` [PATCH] extend map-into (was: new function proposal alist-to-hash) Andrea Corallo
2019-10-06 14:02 ` [PATCH] extend map-into Stefan Monnier
2019-10-06 20:59 ` Andrea Corallo
2019-10-08 17:29 ` Stefan Monnier
2019-10-08 18:46 ` Andrea Corallo
2019-10-08 20:23 ` Stefan Monnier
2019-10-09 15:35 ` Andrea Corallo
2019-10-09 19:41 ` Stefan Monnier
2019-10-09 20:02 ` Andrea Corallo
2019-10-10 8:27 ` Nicolas Petton
2019-10-10 8:28 ` Nicolas Petton
2019-10-10 10:06 ` Andrea Corallo
2019-10-10 11:47 ` Nicolas Petton
2019-10-11 16:19 ` Stefan Monnier
2019-10-11 16:29 ` Andrea Corallo
-- strict thread matches above, loose matches on Subject: below --
2019-10-03 21:25 new function proposal alist-to-hash Andrea Corallo
2019-10-03 21:40 ` Drew Adams
2019-10-03 21:56 ` Stefan Monnier
2019-10-03 22:07 ` Andrea Corallo
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=jwva7aftelx.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=akrl@sdf.org \
--cc=emacs-devel@gnu.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.