From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John Wiegley" Newsgroups: gmane.emacs.devel Subject: Re: cl-pushnew and other functions Date: Sun, 01 Jul 2012 22:50:49 -0500 Organization: New Artisans LLC Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341201063 4715 80.91.229.3 (2 Jul 2012 03:51:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Jul 2012 03:51:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 02 05:51:03 2012 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 1SlXfC-0005aK-5Q for ged-emacs-devel@m.gmane.org; Mon, 02 Jul 2012 05:51:02 +0200 Original-Received: from localhost ([::1]:47434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlXfB-0000Ey-4R for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2012 23:51:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlXf7-0000Eg-JQ for emacs-devel@gnu.org; Sun, 01 Jul 2012 23:50:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlXf5-0005oF-ND for emacs-devel@gnu.org; Sun, 01 Jul 2012 23:50:57 -0400 Original-Received: from mail-qa0-f48.google.com ([209.85.216.48]:59406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlXf5-0005o6-D1 for emacs-devel@gnu.org; Sun, 01 Jul 2012 23:50:55 -0400 Original-Received: by qadz32 with SMTP id z32so1843096qad.0 for ; Sun, 01 Jul 2012 20:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:organization:references:mail-followup-to :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=GDqVZjQBxZGTtuc17OebIg+0AweGKBFW6HGnqv/Sn7g=; b=a4I+s1TOWQmyWBTyUqbBflEPMJilkMqRHNBHK7KHJ3wB3WVw3QE3rnqwWCwtXk15ST E/ipj8hCoYplQdvKyc9YKldhB5RN4F5OM9n6hp1Gukqt0vwqIYBA7ohKpJCcqRdh19ml PZIm6q+f/ch9yUYq+ZDdf04OGiyceCyAQ1bZjO9JPNCqcnmzBNjRaTfnLh1bmnq1+nBk XHhO1/a9NjGZ7+o5R7DL/JBTRE4DEO61NqgVN2TtoxgDgK/DQxuKdfi00aPwTN+zYuEA Im4GhKZhHLD+eJ/AAgZirHpn5Km2yM+eIqhlk/WU0bVFE1b4N94N4cKTvfMwQzNuah0Z KG2Q== Original-Received: by 10.224.59.212 with SMTP id m20mr10311813qah.35.1341201053477; Sun, 01 Jul 2012 20:50:53 -0700 (PDT) Original-Received: from Hermes.local (201.sub-174-231-135.myvzw.com. [174.231.135.201]) by mx.google.com with ESMTPS id gy5sm28617863qab.3.2012.07.01.20.50.51 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 20:50:52 -0700 (PDT) Original-Received: by Hermes.local (Postfix, from userid 501) id C45AD1FEF78F; Sun, 1 Jul 2012 22:50:49 -0500 (CDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Sat, 30 Jun 2012 00:16:30 -0400") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.216.48 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:151342 Archived-At: >>>>> Stefan Monnier writes: >>>> I think the basic function in CL should just be considered part of the >>>> Emacs Lisp language, >>> We simply disagree. >> Why do we disagree? > Because I don't want to simply adopt all those Common-Lisp-isms into Elisp. > A big reason for that is that Elisp is not compiled aggressively, so some > design choices in Common-Lisp would be too costly in Elisp. Well, maybe we disagree less than we think we do. :) If something is ugly, surprising, or has semantics outside what a veteran Elisper would expect, I think cl- is just fine -- even called-for. What I really prefer not to see are the everyday staples getting an ugly prefix, cluttering up mah code. For example: push, incf, loop, destructuring-bind (which is already too long), etc. > Other reasons is that I do not agree with some of Common-Lisp's design > choices (question of taste). For a recent example, define-setf-expander is > ugly and inefficient, so the new "core setf" does not fully support it. Yeah, I'm totally fine with this. If there's a callable thing called "setf" that does what I expect 95% of the time, call me a happy camper. I'm not advocating CL puritanism in Emacs, by no means. I just want count-if and remove-if to be usable, by those names, in code I intend to contribute. I've rewritten those functions too many times to count now because they aren't macros. Enough! Some CL stuff is also just better than any other equivalent we have in core. I know loop is a macro, so we can already use it in contributed code (can't I?), but look how well it aids readability in a use I found for it today Before: (defun gnus-harvest-bbdb-complete-stub (stub) (delete nil (mapcar #'(lambda (record) (let ((nets (bbdb-record-mail record))) (and nets (format "%s <%s>" (bbdb-record-name record) (car nets))))) (bbdb-search (bbdb-records) stub nil stub)))) After: (defun gnus-harvest-bbdb-complete-stub (stub) (loop for record in (bbdb-search (bbdb-records) stub nil stub) for nets = (bbdb-record-mail record) when nets collect (format "%s <%s>" (bbdb-record-name record) (car nets)))) I breathed a sigh of relief there, just reading that again. John