[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The FIXME in `dotimes'
From: |
Philip Kaludercic |
Subject: |
Re: The FIXME in `dotimes' |
Date: |
Wed, 07 Sep 2022 14:19:46 +0000 |
Mattias Engdegård <mattiase@acm.org> writes:
> 7 sep. 2022 kl. 15.37 skrev Philip Kaludercic <philipk@posteo.net>:
>
>> (dotimes (count) ...)
>
> Lisp syntax rarely make the first element optional, and in this case
> it's both the first and the last one:
>
> (dotimes ([VAR] COUNT [RESULT]) BODY...)
>
> which is a bit alien, and it's perhaps not worth the trouble for just
> omitting an underscore?
>
>> (dotimes count ...)
>
> That wouldn't allow for arbitrary expressions so it's of limited
> utility (and Lisp-alien, again). There's also the risk that someone
> will eventually replace a variable by a function call, turning
> (dotimes x ...) into (dotimes (f x) ...).
I agree, the idea was not well thought out and not worth the
complication.