From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: map.el and naming Date: Sat, 28 Feb 2015 16:21:37 +0000 Message-ID: References: <87lhji1aw8.fsf@petton.fr> <8361amtabg.fsf@gnu.org> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c21ff022952a051028613f X-Trace: ger.gmane.org 1425140518 10704 80.91.229.3 (28 Feb 2015 16:21:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2015 16:21:58 +0000 (UTC) Cc: Nicolas Petton , emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 28 17:21:57 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 1YRk9N-0002i2-Jo for ged-emacs-devel@m.gmane.org; Sat, 28 Feb 2015 17:21:57 +0100 Original-Received: from localhost ([::1]:41629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRk9N-00019X-3U for ged-emacs-devel@m.gmane.org; Sat, 28 Feb 2015 11:21:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRk97-00019D-9V for emacs-devel@gnu.org; Sat, 28 Feb 2015 11:21:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRk96-0002BZ-BM for emacs-devel@gnu.org; Sat, 28 Feb 2015 11:21:41 -0500 Original-Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:47734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRk94-0002BJ-SI; Sat, 28 Feb 2015 11:21:38 -0500 Original-Received: by mail-ob0-f181.google.com with SMTP id vb8so23982824obc.12; Sat, 28 Feb 2015 08:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=lNDXnc7VWo2wBoWW3peUxx1XZSmIvcH2k3vOpm0XhMg=; b=FU1rGFakWqQqiSctPt9iLZerSjNE5fuv8nIECx6StNO6Q6UxKzWrXobYb6nmhqjatq UK3HCqyXnbzEINy8eoNwuRdU8Eksux6lGKmUivlBsv96RcFyRIdyC4OhOSA2O3liU47y XhGOExhDJSRpJbOnFopP3wi9ufvwe/ylCc3t+79GQttwyWEv/yg8BTlkQQlI6Yvuje9P jI5NbElsBIb6AW2lqyIaduhx1qejyp8XJW7j/9Jy0xg36jV3NAKN79grPfZ6fv+0ABoa d0SJIj8sGmNFbS9sn97xekii9ImZ4fpquu4oAAYwaJOs7z8JKKw2Mq01GGqiX9pv9QBs /vMw== X-Received: by 10.60.63.39 with SMTP id d7mr13832776oes.4.1425140497943; Sat, 28 Feb 2015 08:21:37 -0800 (PST) Original-Received: by 10.76.130.17 with HTTP; Sat, 28 Feb 2015 08:21:37 -0800 (PST) Original-Received: by 10.76.130.17 with HTTP; Sat, 28 Feb 2015 08:21:37 -0800 (PST) In-Reply-To: <8361amtabg.fsf@gnu.org> X-Google-Sender-Auth: KhAH91SQv7CseEazYpeUymD8cB4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::235 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:183539 Archived-At: --001a11c21ff022952a051028613f Content-Type: text/plain; charset=UTF-8 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" wrote: > > 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. > > > --001a11c21ff022952a051028613f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

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

On Feb 28, 2015 1:49 PM, "Eli Zaretskii&quo= t; <eliz@gnu.org> wrote:
> From: Nicolas Petton &= lt;nicolas@petton.fr>
> Date: Sat, 28 Feb 2015 13:24:55 +0100
>
> I'm working on another library similar to seq.el but for maps (ali= sts
> 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 w= ould
> 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?=C2=A0 IOW, why do we have to use different functions for different classes of objects, instead
of having a single polymorphic interface?=C2=A0 That would solve the naming=
issue as a nice side effect, and more importantly, will allow the
programmer to remember fewer symbols.


--001a11c21ff022952a051028613f--