From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel Subject: Re: Consider adding hash-keys and hash-values Date: Thu, 31 Oct 2013 14:55:43 +0200 Message-ID: References: <1EA2626D6F9E40C799F18421D8FD41B5@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0149cd5eb5716a04ea08f752 X-Trace: ger.gmane.org 1383224150 18084 80.91.229.3 (31 Oct 2013 12:55:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Oct 2013 12:55:50 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 31 13:55:55 2013 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 1Vbrn1-00034A-G7 for ged-emacs-devel@m.gmane.org; Thu, 31 Oct 2013 13:55:55 +0100 Original-Received: from localhost ([::1]:57039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbrn1-0001hJ-5J for ged-emacs-devel@m.gmane.org; Thu, 31 Oct 2013 08:55:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbrmx-0001h7-NK for emacs-devel@gnu.org; Thu, 31 Oct 2013 08:55:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbrmq-0000dP-7O for emacs-devel@gnu.org; Thu, 31 Oct 2013 08:55:51 -0400 Original-Received: from mail-oa0-x229.google.com ([2607:f8b0:4003:c02::229]:52620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbrmq-0000d5-2A for emacs-devel@gnu.org; Thu, 31 Oct 2013 08:55:44 -0400 Original-Received: by mail-oa0-f41.google.com with SMTP id o9so3023099oag.28 for ; Thu, 31 Oct 2013 05:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=0bNQIIj273gXk4im/c7oJUXoSOWThVPsbX+fEhf4kf8=; b=ihoFKi1K+bWyanCP7mwyjJ8jsH3VUUQWsZ1nSSMxVbXK59B5HiotrPQ1Lh+6S+zQ2r U+Zigz56DfojOe/1lFF3qX6xryih8RubU/NmTcNR5yTuUytXp731O0slgoo03TbixY3C gE0PpXlA/DHRGEVhGF+/t9S355HMOAj43DlnC1PjTZwqzYnamqUa6AiLbrs4ayJnqu+K 23rS9GKfRSMtvzb1I6cHwumEY6aF/BC3GxL3+nVokdbuwFR2vtJhIgp/McJHnKCLGc4J Z8zOWlCzVDq+72ORveePc6QCiu/UGr9Bs3Lx+LhLE+Q/fJkrBcWQrw1xzd18MBMzBBLT DfLQ== X-Received: by 10.182.144.136 with SMTP id sm8mr2496309obb.63.1383224143342; Thu, 31 Oct 2013 05:55:43 -0700 (PDT) Original-Received: by 10.76.131.116 with HTTP; Thu, 31 Oct 2013 05:55:43 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: k0ACNxjyZilVKEtdFONUY8T9JXk X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::229 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:164726 Archived-At: --089e0149cd5eb5716a04ea08f752 Content-Type: text/plain; charset=UTF-8 Sounds reasonable. Maybe we can use another name, though? Something in the lines of `helpers`, `extras`, etc. On 30 October 2013 15:11, Stefan Monnier wrote: > >> (defun hash-keys (hashtable) > > It would have to be "hash-table-keys". > > But again, I'm not sure it provides a useful enough abstraction to > justify adding this one-liner in every Emacs executable. > > Tho, maybe we could introduce a new file "oneliners.el" where we could > collect such functions (probably most/all defined as `defsubst' so that > you can (eval-when-compile (require 'oneliners)). > > > Stefan > --089e0149cd5eb5716a04ea08f752 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sounds reasonable. Maybe we can use another name, though? = Something in the lines of `helpers`, `extras`, etc.


On 30 October 2013 15:11, Stefa= n Monnier <monnier@iro.umontreal.ca> wrote:
>> (defun hash-keys (hashtable)

It would have to be "hash-table-keys".

But again, I'm not sure it provides a useful enough abstraction to
justify adding this one-liner in every Emacs executable.

Tho, maybe we could introduce a new file "oneliners.el" where we = could
collect such functions (probably most/all defined as `defsubst' so that=
you can (eval-when-compile (require 'oneliners)).


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--089e0149cd5eb5716a04ea08f752--