From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#29866: 27.0.50; cl-loop: Calculate the array length just once Date: Thu, 28 Dec 2017 06:36:55 +0900 (JST) Message-ID: References: <87wp18179m.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1514410578 25005 195.159.176.226 (27 Dec 2017 21:36:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Dec 2017 21:36:18 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: 29866@debbugs.gnu.org, Tino Calancha To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 27 22:36:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1eUJMw-0005xT-FV for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Dec 2017 22:36:10 +0100 Original-Received: from localhost ([::1]:48986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUJOv-0006Wx-D8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Dec 2017 16:38:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUJOq-0006Wl-2A for bug-gnu-emacs@gnu.org; Wed, 27 Dec 2017 16:38:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUJOk-0004dk-Qp for bug-gnu-emacs@gnu.org; Wed, 27 Dec 2017 16:38:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45561) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUJOk-0004d3-G0 for bug-gnu-emacs@gnu.org; Wed, 27 Dec 2017 16:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eUJOk-0002eC-40 for bug-gnu-emacs@gnu.org; Wed, 27 Dec 2017 16:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Dec 2017 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29866 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 29866-submit@debbugs.gnu.org id=B29866.151441062410103 (code B ref 29866); Wed, 27 Dec 2017 21:38:02 +0000 Original-Received: (at 29866) by debbugs.gnu.org; 27 Dec 2017 21:37:04 +0000 Original-Received: from localhost ([127.0.0.1]:54242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUJNn-0002ct-Ua for submit@debbugs.gnu.org; Wed, 27 Dec 2017 16:37:04 -0500 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:41562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUJNm-0002cQ-UV for 29866@debbugs.gnu.org; Wed, 27 Dec 2017 16:37:03 -0500 Original-Received: by mail-wm0-f48.google.com with SMTP id g75so41483815wme.0 for <29866@debbugs.gnu.org>; Wed, 27 Dec 2017 13:37:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=CHXjMR2gx8wkGeLeYW1Fs32eKu7dBA46F9ma7Mr9kyI=; b=SQl+QmC00Q9JxeuPGxsN+UqdC8tBeffQvebvjNnz35aGE1Eo/TwX4IHPdEFbGi32KV UuDY1DhIlLXNlz1UWATFniYxkuFBz6ZajQZqIvOfztp4ai+IK5WXmaae4HodYfT+dxuf qbss5jqLVzP341LFbR4x/Z+0yRFSsEQ7ZocsJlfLGMbJPU+tQUwCJEr+FlvuTx7EGrvv MUDztEo9RcYGKJ9hRe4LgIOCtXA10l/VQYmtb0DsTklgm/B5REBl6IxWjULw2pJFm8M6 tLoLA4mPdmaQgEJ9ffBUM9AdhGumDXcJofo+Mfh8T1UWXzdRXTKxqONzZeOq9tCB3Hsy 0v1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=CHXjMR2gx8wkGeLeYW1Fs32eKu7dBA46F9ma7Mr9kyI=; b=NnGS05tMPQQEdFiLVBWaKb1q5gA8fcJAVuYdAMseGwxt+8C0JNoBFQ1V5A70u1gnVd nj8pLFcI8UqGN/tbI3hSLHzRCaFE5sJZ5AzGSOnX6D3evR1a8AjLltgVxZJMf9TZ7G7D wWSDVa06e7aKGrHkfDq4t1FUTAnCQ7TIlhO73A3KpjuxCIHXrToe/QMDVZmhE6Yaf23u lVjm78Ev4YaLl6zeM095K8B1jNEK9x3aNkevJ/MvRsbHFB0ZIMGV38vD7s+1cRlDYIwa wZ2FU0p3SNAFz0WCbU7ZnlL76EJTry9pMg/1LYotiUNE2Vul/83OSslE1SS3QNPgW3cB RETw== X-Gm-Message-State: AKGB3mKZneTE7qZJeHX3LHOX6gjBos/VC6KK5M1qMRKCG7Puqbsg1c5b wodQclYatN6iSR71MnWfmH4= X-Google-Smtp-Source: ACJfBot+MM2nRRScfqYKqrTY8r6au3caWL6gSOxISI6m8zh7RMtC9Lqs9EukqJjxApM62Fw8rsiFzw== X-Received: by 10.80.171.131 with SMTP id u3mr16585696edc.111.1514410617224; Wed, 27 Dec 2017 13:36:57 -0800 (PST) Original-Received: from calancha-pc (228.red-83-40-68.dynamicip.rima-tde.net. [83.40.68.228]) by smtp.gmail.com with ESMTPSA id u21sm25941929edl.54.2017.12.27.13.36.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Dec 2017 13:36:56 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141551 Archived-At: On Wed, 27 Dec 2017, Stefan Monnier wrote: >> X-Debbugs-CC: monnier@iro.umontreal.ca > > Thanks. > >> It looks sensible to calculate the array length just once, >> instead of recalculate it on each iteration: > > I tend to agree, but I don't know very much about the intended semantics > of Common Lisp's `loop` macro, nor about cl-loop's implementation (tho > I admit I did mess with it without being really sure what I was doing). While studying this code I found easier to hack if we use gensym's instead of make-symbol; otherwise, the code creates several symbols with the same printed representation "--cl-var--". For example, with current code you can read expansions with something like: (let* ((--cl-var-- 'foo) (--cl-var-- 'bar)) I prefer to read: (let* ((--cl-var--1 'foo) (--cl-var--2 'bar)) Do you have any preference in these cases?