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
Is your feature request related to a problem? Please describe.
I’m running sci with the :termination-safe preset, and my users wanted to be able to use dotimes for a finite loop, but this fails because it delegates to the forbidden loop. It’s possible to manually rewrite such code using doseq and range, but we could save people the surprise and effort.
Describe the solution you'd like
I was thinking we could simply provide an alternate implementation of dotimes which was implemented without loop, probably with doseq and range to avoid this issue.
Describe alternatives you've considered
As described above, we can simply have users do it themselves.
Additional context
I brought this idea up on the babashka channel of the clojurians slack, and Michiel agreed that it might be a useful enhancement. He suggested looking at the history of the macro .cljc file to see how a similar fix had already been made to for. A quick scan suggests it might be #141
This is an interesting problem so I may try my hand at a PR, but want to capture the issue first anyway, because given all the issues I am working on in my own projects, it might not be realistic that I will get around to working on this.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I’m running sci with the
:termination-safe
preset, and my users wanted to be able to usedotimes
for a finite loop, but this fails because it delegates to the forbiddenloop
. It’s possible to manually rewrite such code usingdoseq
andrange
, but we could save people the surprise and effort.Describe the solution you'd like
I was thinking we could simply provide an alternate implementation of
dotimes
which was implemented withoutloop
, probably withdoseq
andrange
to avoid this issue.Describe alternatives you've considered
As described above, we can simply have users do it themselves.
Additional context
I brought this idea up on the babashka channel of the clojurians slack, and Michiel agreed that it might be a useful enhancement. He suggested looking at the history of the macro .cljc file to see how a similar fix had already been made to
for
. A quick scan suggests it might be #141This is an interesting problem so I may try my hand at a PR, but want to capture the issue first anyway, because given all the issues I am working on in my own projects, it might not be realistic that I will get around to working on this.
The text was updated successfully, but these errors were encountered: