[Openmcl-devel] Trunk and released version
ron at flownet.com
Thu Aug 13 18:13:12 UTC 2009
On Aug 13, 2009, at 10:51 AM, Tobias C. Rittweiler wrote:
> Ron Garret <ron at flownet.com> writes:
>> On Aug 13, 2009, at 9:12 AM, Tim Bradshaw wrote:
>>> On 13 Aug 2009, at 15:55, Ron Garret wrote:
>>>> I'd call that a bug in the ANSI spec. It violates the principle of
>>>> least surprise for no benefit whatsoever. If X is unconditionally
>>>> bound to NIL then there is no point in even having it in scope when
>>>> the result-form is evaluated.
>>> I'm guessing it's for compatibility with DOTIMES.
>> But in the case of DOTIMES the iteration variable is rebound (or
>> assigned) to a potentially useful value. In the case of DOLIST it's
>> assigned (or rebound) to a constant (NIL) which cannot possibly serve
>> any useful purpose.
> It allows for an implementation based on DO*.
Huh? How would removing the requirement of having VAR rebound (or
reassigned) to NIL make it harder to implement DOLIST in terms of DO*?
For that matter, what would be wrong with:
(defmacro sane-dolist ((var list &optional ret) &body body)
`(do* ((l1 ,list (cdr l1)) (,var (car l1) (car l1)))
((null (cdr l1)) (progn , at body) ,ret)
, at body))
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel