[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new function proposal alist-to-hash
From: |
Andrea Corallo |
Subject: |
Re: new function proposal alist-to-hash |
Date: |
Sat, 05 Oct 2019 15:45:45 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) |
Stefan Monnier <address@hidden> writes:
>> 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).
Correct.
>> 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).
I guess one of the reasons is that as discussed depending on the case
expressing them in a literal form can be not so convenient.
> Stefan
>
Bests
Andrea
--
address@hidden
- new function proposal alist-to-hash, Andrea Corallo, 2019/10/03
- Re: new function proposal alist-to-hash, Andrea Corallo, 2019/10/04
- [PATCH] extend map-into (was: new function proposal alist-to-hash), Andrea Corallo, 2019/10/05
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/06
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/06
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/08
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/08
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/08
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/09
- Re: [PATCH] extend map-into, Stefan Monnier, 2019/10/09
- Re: [PATCH] extend map-into, Andrea Corallo, 2019/10/09
- Re: [PATCH] extend map-into, Nicolas Petton, 2019/10/10