emacs-devel
[Top][All Lists]
Advanced

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

Re: map.el and naming


From: Artur Malabarba
Subject: Re: map.el and naming
Date: Sat, 28 Feb 2015 16:21:37 +0000

I have no preference for the name, but I agree there's no reason to divide this functionality in two.

On Feb 28, 2015 1:49 PM, "Eli Zaretskii" <address@hidden> wrote:
> From: Nicolas Petton <address@hidden>
> Date: Sat, 28 Feb 2015 13:24:55 +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?  IOW, why do we have
to use different functions for different classes of objects, instead
of having a single polymorphic interface?  That would solve the naming
issue as a nice side effect, and more importantly, will allow the
programmer to remember fewer symbols.



reply via email to

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