unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: new function proposal alist-to-hash
@ 2019-10-04  9:58 Andrea Corallo
  2019-10-04 19:16 ` Stefan Monnier
  0 siblings, 1 reply; 20+ messages in thread
From: Andrea Corallo @ 2019-10-04  9:58 UTC (permalink / raw)
  To: akrl; +Cc: Stefan Monnier, emacs-devel

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

--
akrl@sdf.org



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-10-11 16:29 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).