help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plists, alists, and hashtables


From: Ted Zlatanov
Subject: Re: plists, alists, and hashtables
Date: Tue, 04 Aug 2015 07:23:52 -0400
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

On Tue, 4 Aug 2015 10:29:04 +0000 Nicolas Petton <address@hidden> wrote: 

NP> On Tue Aug 4 11:15:27 2015 GMT+0100, Ted Zlatanov wrote:
>> The real map type in Emacs Lisp is the hashtable, I think. But because
>> of historical baggage, we end up discussing the benefits of two list
>> formats when used as maps. Which feels like discussing which of two
>> different bicycles is better for carrying 5 people.
>> 
>> For instance, the hashtable keys are unambiguously
>> (hash-table-keys my-hashtable) and there's no looping or parsing.
>> 
>> I wonder, if hashtables had a better reader syntax (like plists or
>> alists) and better Customize support, would they see wider use?

NP> The new map.el library provides a common interface for both hashtables
NP> and alists (as well as other key/value data structures). Maybe that
NP> will make it easier for people to use hashtables?

It's a nice API, but doesn't help with historical baggage (the dozens
of tutorials that use lists as maps; the inertia on the mailing lists;
the already-written code people will copy).  I still think more is
needed like I mentioned to reach a tipping point.

Ted


reply via email to

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