From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 1b4442b: Don't expand body inside a let-binding when there are no bindings Date: Thu, 16 Feb 2017 23:44:22 -0500 Message-ID: <878tp58lzt.fsf@holos> References: <20170216014306.20854.5128@vcs0.savannah.gnu.org> <20170216014308.12DC326007@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1487306683 17716 195.159.176.226 (17 Feb 2017 04:44:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2017 04:44:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 17 05:44:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ceaPI-0003ih-9y for ged-emacs-devel@m.gmane.org; Fri, 17 Feb 2017 05:44:32 +0100 Original-Received: from localhost ([::1]:51526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceaPO-0003YJ-5C for ged-emacs-devel@m.gmane.org; Thu, 16 Feb 2017 23:44:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceaPF-0003XI-8z for emacs-devel@gnu.org; Thu, 16 Feb 2017 23:44:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceaPC-0004QG-6A for emacs-devel@gnu.org; Thu, 16 Feb 2017 23:44:29 -0500 Original-Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]:36858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceaPC-0004Pa-1F for emacs-devel@gnu.org; Thu, 16 Feb 2017 23:44:26 -0500 Original-Received: by mail-qt0-x230.google.com with SMTP id k15so32223086qtg.3 for ; Thu, 16 Feb 2017 20:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Rf2csrfZwrPX2nFsjC1TCSCIXMqyVHM+0z+NGEOGaFA=; b=Z1wDmBJTbrkTRJhBum89JsaQXt+sUz7Io58tqd4lBXeM6/3FIO4w/MlVLQE9dUfvkR 6B47EAwz+gYNhiiQHHts+uhSGK6Rd5Fc2SzeF7eJ9r3GIiTtuUbOCX8wK7P1gvVkBUpW APWji4wqRzq2NBK5yF4l/hErRsQE1zMewqL7djGgt4QitFWsUmzESXNWfy4oI2T8gtBL eEfAK9cPjFuxJZOPOd8uA3fKQIjUUvm80vdtFIDvz25R7va5fLWlxpXXCrjpczirD52D HczAhmUknIP3s8ObPszMkiNQwqobaJT+hYBpec06X4/ufU6hbSr5zT5Az08zUyVrfhTv /0Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Rf2csrfZwrPX2nFsjC1TCSCIXMqyVHM+0z+NGEOGaFA=; b=ARWBENNRTbkW/TREVmwg1Nv1MjuWCdedO6Uc3aXvvw311Bf+Ri13FCpeYSvh/zyQSO tPfcnNojgnB2u1JhM1YaxR+43c85imjkRxUWT2TT6knrR5MkLW3xo3FjYxfBSqW2OwN+ f/ht/WRR1Znqpkqkb0PR0SOVKmPwBSkXuP75NBJa4iFMJ1lCgg0iOG4GD3/GuslbWqci p1fGoYlyTZ0dCuiOIoslvrD4BK+pzB+4FLX8CR2tSazEbI++TLHKJ5RNYF4eTD75AZlm Crv3xZNEzmNT2RgJscLmlQoHFJzHPvSNtrPf4SqX+IWBNkBk+tGaGZREtPmgXPwI2fhW PTHg== X-Gm-Message-State: AMke39kBtuy36JHniaOPSrow2n096QyknLjQd9mIOG3XEhWV0zweV9fXaKRDlT5fAcQmgEZq X-Received: by 10.237.34.239 with SMTP id q44mr5420232qtc.18.1487306665087; Thu, 16 Feb 2017 20:44:25 -0800 (PST) Original-Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id l53sm5808916qtl.41.2017.02.16.20.44.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 20:44:23 -0800 (PST) Original-Received: by holos.localdomain (Postfix, from userid 1000) id EB52669C58; Thu, 16 Feb 2017 23:44:22 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Thu, 16 Feb 2017 08:32:06 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212427 Archived-At: Stefan Monnier writes: >> + (if vars >> + `(let ,(mapcar (lambda (b) (list (car b) (cdr b))) vars) >> + ,@code) >> + `(progn ,@code))) > > Just curious here: > > I resisted the temptation to do that when working on that code because > I thought that it should (both in the sense that I expect the current > code to behave that way, and in the sense that if it doesn't behave that > way, we should fix it) make no difference to the byte-code we generate. > > So, I'm wondering if you've found a concrete case where it makes > a difference, or it's just that you wanted the output to look > more pretty. Nope, AFAICT the bytecode remains the same. In the past I noticed that pcase expanded things to (let nil ...), which I think is a bit annoying wrt readability, yes; however just recently I was poking at elint.el, which complains about such forms with Empty varlist in let: (let nil ) so I was more inclined to change it. Between vars possibly being expensive, and--one step beyond that--using an uninterned symbol to ameliorate evalling vars twice incurring a cost with dynamic binding, I suppose this change was short sighted.