You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cl-loop allows this, but iterate does not. Allowing this makes destructured accumulation much slower, which encourages work around rather than using this feature.
It would be better to have the loop be as fast as possible, but that costs flexibility. The question is: Do people actually need to modify accumulation variables outside of loop commands while the loop is running?
User input is needed.
The text was updated successfully, but these errors were encountered:
At this point, I'm definitely leaning towards "no".
As stated above, the current behavior:
discourages naming accumulation variables due to the speed penalty
discourages using destructuring accumulations, which require named variables
encourages using the split flag and knowing more about the macro's internals, just to write (IMO) less readable code
The macro is only useful so long as it is convenient. There are already limitations to how the macro's arguments can be used, and restricting this would change little. Besides, if a user needed to go beyond the accumulation commands, they would probably just use expr in some amount anyway. It is no loss to just use expr fully then.
That being said, it would be nice to add more accumulation commands to lessen the need to go beyond them. E.g., if one can collect at both ends of a list, then one should probably be able to drop at both ends as well.
Disallowing this behavior while adding more accumulation commands should solve this issue, keeping both speed and usefulness.
okamsn
changed the title
Should accumulation variables be modifiable outside of commands?
Don't allow editing accumulation variables outside of accumulation commands
Aug 21, 2021
cl-loop
allows this, butiterate
does not. Allowing this makes destructured accumulation much slower, which encourages work around rather than using this feature.It would be better to have the loop be as fast as possible, but that costs flexibility. The question is: Do people actually need to modify accumulation variables outside of loop commands while the loop is running?
User input is needed.
The text was updated successfully, but these errors were encountered: