[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The FIXME in `dotimes'
From: |
Robert Pluim |
Subject: |
Re: The FIXME in `dotimes' |
Date: |
Wed, 07 Sep 2022 16:29:42 +0200 |
>>>>> On Wed, 07 Sep 2022 14:19:46 +0000, Philip Kaludercic
>>>>> <philipk@posteo.net> said:
Philip> 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) ...).
Philip> I agree, the idea was not well thought out and not worth the
Philip> complication.
Surely the goal here should be to borrow a name from other languages,
but have the result behave differently?
(defmacro range (count &rest body)
đ
Robert
--