[Openmcl-devel] Trunk and released version
Ron Garret
ron at flownet.com
Thu Aug 13 11:13:12 PDT 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))
rg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20090813/6ce16d88/attachment.htm>
More information about the Openmcl-devel
mailing list