From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: map.el and naming Date: Mon, 02 Mar 2015 15:20:14 +0200 Message-ID: <83fv9nsfht.fsf@gnu.org> References: <87lhji1aw8.fsf@petton.fr> <8361amtabg.fsf@gnu.org> <87ioej26ij.fsf@petton.fr> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1425302465 14381 80.91.229.3 (2 Mar 2015 13:21:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2015 13:21:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 02 14:20:59 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YSQHK-0007NY-RR for ged-emacs-devel@m.gmane.org; Mon, 02 Mar 2015 14:20:58 +0100 Original-Received: from localhost ([::1]:57034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSQHK-0001Ud-24 for ged-emacs-devel@m.gmane.org; Mon, 02 Mar 2015 08:20:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSQGr-0001SN-FI for emacs-devel@gnu.org; Mon, 02 Mar 2015 08:20:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSQGo-0006yc-6s for emacs-devel@gnu.org; Mon, 02 Mar 2015 08:20:29 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:46740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSQGn-0006yS-UH for emacs-devel@gnu.org; Mon, 02 Mar 2015 08:20:26 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NKL0080064U8500@mtaout28.012.net.il> for emacs-devel@gnu.org; Mon, 02 Mar 2015 15:18:49 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKL002V16BDR960@mtaout28.012.net.il>; Mon, 02 Mar 2015 15:18:49 +0200 (IST) In-reply-to: <87ioej26ij.fsf@petton.fr> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183562 Archived-At: > From: Nicolas Petton > Cc: Nicolas Petton , emacs-devel@gnu.org > 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?