emacs-devel
[Top][All Lists]
Advanced

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

Re: map.el and naming


From: Eli Zaretskii
Subject: Re: map.el and naming
Date: Mon, 02 Mar 2015 15:20:14 +0200

> From: Nicolas Petton <address@hidden>
> Cc: Nicolas Petton <address@hidden>, address@hidden
> Date: Mon, 02 Mar 2015 08:38:44 +0100
> 
> >> I'm working on another library similar to seq.el but for maps (alists
> >> and hash-tables for now).
> >> 
> >> I have an issue with naming regarding mapping over keys/values of a
> >> map. I thought about calling `map-map' the function that would map over
> >> the keys and values of map, and `map-map-keys' the function that would
> >> map over the keys of a map, etc.
> >
> > Are there any reasons why we couldn't have map-keys that could accept
> > any object where such an operation makes sense?
> 
> That's what I'm doing :)

Then why are you writing a separate library, which is "similar to
seq.el but for maps"?  Why not have a single library that handles all
of these objects: lists, strings, vectors, alists, and hash-tables?

> The only issue I have is regarding naming.  Stefan proposed to name the
> library map.el, which I like.  The only issue I have is that "map" is
> used for the noun (a map) and the verb (to map over things).  The result
> is that to map over the keys/values of a map, I have a function named
> `map-map', and I think that's unclear and ugly.

If you have a single library, this issue will go away, right?



reply via email to

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