<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 13, 2009, at 10:51 AM, Tobias C. Rittweiler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Ron Garret &lt;<a href="mailto:ron@flownet.com">ron@flownet.com</a>&gt; writes:<br><br><blockquote type="cite">On Aug 13, 2009, at 9:12 AM, Tim Bradshaw wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">On 13 Aug 2009, at 15:55, Ron Garret wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I'd call that a bug in the ANSI spec. &nbsp;It violates the principle of &nbsp;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">least surprise for no benefit whatsoever. &nbsp;If X is unconditionally &nbsp;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">bound to NIL then there is no point in even having it in scope when &nbsp;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">the result-form is evaluated.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm guessing it's for compatibility with DOTIMES.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But in the case of DOTIMES the iteration variable is rebound (or &nbsp;<br></blockquote><blockquote type="cite">assigned) to a potentially useful value. &nbsp;In the case of DOLIST it's &nbsp;<br></blockquote><blockquote type="cite">assigned (or rebound) to a constant (NIL) which cannot possibly serve &nbsp;<br></blockquote><blockquote type="cite">any useful purpose.<br></blockquote><br>It allows for an implementation based on DO*.<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><br></div><div>Huh? &nbsp;How would removing the requirement of having VAR rebound (or reassigned) to NIL make it harder to implement DOLIST in terms of DO*?</div><div><br></div><div>For that matter, what would be wrong with:</div><div><br></div><div><div>(defmacro sane-dolist ((var list &amp;optional ret) &amp;body body)</div><div>&nbsp;&nbsp;`(do* ((l1 ,list (cdr l1)) (,var (car l1) (car l1)))</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;((null (cdr l1)) (progn ,@body) ,ret)</div><div>&nbsp;&nbsp; &nbsp; ,@body))</div><div><br></div><div>rg</div><div><br></div></div></body></html>