|
From: | Tino Calancha |
Subject: | bug#29866: 27.0.50; cl-loop: Calculate the array length just once |
Date: | Thu, 28 Dec 2017 06:36:55 +0900 (JST) |
User-agent: | Alpine 2.20 (DEB 67 2015-01-07) |
On Wed, 27 Dec 2017, Stefan Monnier wrote:
X-Debbugs-CC: monnier@iro.umontreal.caThanks.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 withthe 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?
[Prev in Thread] | Current Thread | [Next in Thread] |