emacs-devel
[Top][All Lists]
Advanced

[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: Fri, 04 Oct 2019 09:58:43 +0000

I just wanted elaborate a little more on the following two points:

- I think is quite useful to be able to create in a concise and
  explicit way nested hash tables. This is a common feature of many
  "modern" languages.
  Here both solutions compared:

(alist-to-hash '((a . x)
                 (b . ((i . j)
                       (k . l)))
                 (c . y)))

(map-into `((a . x)
            (b . ,(map-into '((i . j)
                              (k . l))
                            'hash-table))
            (c . y))
          'hash-table)

- map-into does not let you tweak make-hash-table parameters.
  This is especially a limitation regarding :test so is effectively a
  solution to say ~50% of the use cases.

Bests
  Andrea

--
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]