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: Sat, 28 Feb 2015 15:49:55 +0200 Message-ID: <8361amtabg.fsf@gnu.org> References: <87lhji1aw8.fsf@petton.fr> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1425131421 2569 80.91.229.3 (28 Feb 2015 13:50:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2015 13:50:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 28 14:50:12 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 1YRhmU-0001D3-O5 for ged-emacs-devel@m.gmane.org; Sat, 28 Feb 2015 14:50:10 +0100 Original-Received: from localhost ([::1]:41248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRhmT-0006wM-VF for ged-emacs-devel@m.gmane.org; Sat, 28 Feb 2015 08:50:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRhmP-0006uH-Sz for emacs-devel@gnu.org; Sat, 28 Feb 2015 08:50:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRhmK-00031L-Tf for emacs-devel@gnu.org; Sat, 28 Feb 2015 08:50:05 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:43060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRhmK-00031E-MM for emacs-devel@gnu.org; Sat, 28 Feb 2015 08:50:00 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NKH00600I10S100@mtaout24.012.net.il> for emacs-devel@gnu.org; Sat, 28 Feb 2015 15:41:55 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKH00M6VI1VW080@mtaout24.012.net.il>; Sat, 28 Feb 2015 15:41:55 +0200 (IST) In-reply-to: <87lhji1aw8.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.180 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:183538 Archived-At: > From: Nicolas Petton > 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.