From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] What's the quickest way to contribute? Date: Tue, 13 Jan 2015 05:57:31 +0300 Message-ID: <54B4899B.8010004@yandex.ru> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1421117878 4358 80.91.229.3 (13 Jan 2015 02:57:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Jan 2015 02:57:58 +0000 (UTC) To: Oleh Krehel , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 13 03:57:52 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 1YArfz-0002HD-Hv for ged-emacs-devel@m.gmane.org; Tue, 13 Jan 2015 03:57:51 +0100 Original-Received: from localhost ([::1]:37150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YArfy-0001Xg-Oy for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2015 21:57:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YArfm-0001Xb-CL for emacs-devel@gnu.org; Mon, 12 Jan 2015 21:57:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YArfj-0008In-6Z for emacs-devel@gnu.org; Mon, 12 Jan 2015 21:57:38 -0500 Original-Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:37044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YArfi-0008Ih-Tn for emacs-devel@gnu.org; Mon, 12 Jan 2015 21:57:35 -0500 Original-Received: by mail-la0-f53.google.com with SMTP id gm9so420781lab.12 for ; Mon, 12 Jan 2015 18:57:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=MTvPoe91OmIz1F7+p1crg+BXFYyjC15hSkRlLkkp4aw=; b=0pHbL4j5H5ICxbR5Swom6zX7UEsEhSQ+upjLMZJNC66KKcgGsR1iXO6TtXVT3eKGcW Evryrvj/P9ERaAXxsKdoJ8fNnqqLxm9WSwMPVevLfnMzSJv+h64GsG8NbqPjJ9zXkRyH RAQPNqOrkAxhATAhs7j/yPIf2hXNNqBULtjq+nxRdq6AV1oD6PaS54FgGIWf0iMSshWl DLZeP76Htwjc/9yUxv24c4a8Sj24+8vmbI3wSmXesD/D0QvWaW6kdwblGUHA8tkR5oAX rWEmL44HBqu+ui3kSV+6tRSAnBbnz/j4zBiUTMmw0fMgDnvvto2pq5BKdH31ngU7Asz5 gzDA== X-Received: by 10.112.198.1 with SMTP id iy1mr39634422lbc.13.1421117854040; Mon, 12 Jan 2015 18:57:34 -0800 (PST) Original-Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id wq1sm4600427lbb.24.2015.01.12.18.57.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jan 2015 18:57:33 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::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:181200 Archived-At: On 01/08/2015 08:59 PM, Oleh Krehel wrote: Regarding this patch: > Finally, I attach one more patch that I'd like some feedback on. > I was browsing replace.el and found this type of code: > > (delq nil (mapcar #'(lambda (buf) > (when (buffer-live-p buf) buf)) > bufs)) > > instead of this: > > (cl-remove-if-not #'buffer-live-p bufs) > > If this were my package, I would change it without batting an eye, > since the latter code is more clear and algorithmically faster. Personally, I'd hesitate to make a change like this unless there's a semi-plausible scenario where this code is wrong (when a `buf' values could be nil), or where the change in performance could plausibly be noticed by a user. Since the number of buffers opened in Emacs is very unlikely to be high enough, probably not. And the code reads well enough. > Or maybe there's a policy of not fixing things that aren't broke. Mostly this. Using `cl-' functions is allowed, but I guess there remains some amount of prejudice against the CL coding style, and using those (more complicated) functions when simpler ones can work just as well.