<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 <<a href="mailto:ron@flownet.com">ron@flownet.com</a>> 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.  It violates the principle of  <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">least surprise for no benefit whatsoever.  If X is unconditionally  <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  <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  <br></blockquote><blockquote type="cite">assigned) to a potentially useful value.  In the case of DOLIST it's  <br></blockquote><blockquote type="cite">assigned (or rebound) to a constant (NIL) which cannot possibly serve  <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?  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 &optional ret) &body body)</div><div>  `(do* ((l1 ,list (cdr l1)) (,var (car l1) (car l1)))</div><div>        ((null (cdr l1)) (progn ,@body) ,ret)</div><div>     ,@body))</div><div><br></div><div>rg</div><div><br></div></div></body></html>