From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master 96e61a9 26/26: Add packages/darkroom by merging its upstream subtree Date: Mon, 22 Dec 2014 08:51:59 +0000 Message-ID: References: <20141219190721.4296.62862@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1419238348 23325 80.91.229.3 (22 Dec 2014 08:52:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2014 08:52:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 22 09:52:21 2014 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 1Y2yiy-0005Yl-Ne for ged-emacs-devel@m.gmane.org; Mon, 22 Dec 2014 09:52:20 +0100 Original-Received: from localhost ([::1]:39619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2yix-0000bL-NF for ged-emacs-devel@m.gmane.org; Mon, 22 Dec 2014 03:52:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2yip-0000bD-7Q for emacs-devel@gnu.org; Mon, 22 Dec 2014 03:52:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2yij-0005F9-Or for emacs-devel@gnu.org; Mon, 22 Dec 2014 03:52:11 -0500 Original-Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:34498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2yij-0005Et-HY for emacs-devel@gnu.org; Mon, 22 Dec 2014 03:52:05 -0500 Original-Received: by mail-wi0-f179.google.com with SMTP id ex7so7227455wid.12 for ; Mon, 22 Dec 2014 00:52:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=JkZsV4s+GnMev3GGWDtQPymIaBKglNtTuPuCkP5h32s=; b=FqOgWlqkM3tmw05xeMeFQzLeXQ3PZkIAqNPDEWodqQ0sgTp1UjJpU88AvqvHaWxD2k YpOVf9z55deKALqvJUeMIgzA2k6G9Yk7MxkFREoKKn2YUN2JdZHsvjP3OgftIm1TKif1 yTDaVktXQ91qHmOIdad+x3P+fv/jOG/RyF5eh1ocTlmKUDX22vuoQe+XxLz2GeHkKz1h ZF1hgIUcgoNcKlt48Pb0OnGwxQdUj6RrsTG18h1DcAEApey+nU00yYFvDHdAKaJNRiKD QvIM0pXiIdqWbHSPn876yhWVegemhRM7nu77Xn9z931DdFj5BlouLNy0wbSD747SaeJK v7wg== X-Received: by 10.180.218.39 with SMTP id pd7mr29388802wic.21.1419238324089; Mon, 22 Dec 2014 00:52:04 -0800 (PST) Original-Received: from king.yourcompany.com (31.57.37.188.rev.vodafone.pt. [188.37.57.31]) by mx.google.com with ESMTPSA id u9sm22838606wjy.37.2014.12.22.00.52.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Dec 2014 00:52:03 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 21 Dec 2014 22:04:11 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (darwin) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::233 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:180469 Archived-At: Stefan Monnier writes: >>>> + (mapc #'(lambda (w) >>>> + (with-selected-window w >>>> + (darkroom--set-margins))) >>>> + (get-buffer-window-list (current-buffer)))) >>>=20 >>> I recommend the use of `dolist' instead of `mapc' when the body of the >>> loop is provided by an anonymous function and we're looping over a list. >>>=20 >>> If the compiler could tell that we're looping over a list, it could >>> auto-transform the mapc call into a dolist (which is slightly more >>> efficient), but having to expend it to a loop that handles both lists >>> and arrays (like `mapc' does) makes the resulting code no more efficient >>> than just using `mapc'. >>>=20 >> Alright, makes sense. What if I use `(cl-loop for w in ...list...)` >> which is my preferred cl-idiom anyway? > > Use whichever you prefer. I was just pointing out the style I tend > to prefer, partly for efficiency reasons (and also because I haven't > managed to plug that efficiency problem in the optimizer). Yes, the idea came across. When it isn't "outsmarting" or premature, it's useful to use idioms that will probably help the compiler. To use mapc for lists in this context, all one could do is wait for some kind type inference engine, which is probably in a more distant future. Jo=C3=A3o