On 21 Feb., 18:24, Mark Volkmann <r.mark.volkm...@gmail.com> wrote:
> Currently the dotimes macro requires its first argument to be a vector
> for binding a variable to the number of times the body should be
> executed. Inside the body, that variable is bound to the values from 0
> to that number minus 1. How about changing this macro to also accept
> an integer as the first argument instead of a binding vector for cases
> where the number isn't needed in the body.

I don’t find this very interesting.
There several variants of how dotimes could be, but the one that we
currently have is the one that is used since a few decades in Lisp,
and it is the one that makes very much sense.


> For example,
>
> (print "Santa says")
> (dotimes 3 (print "Ho"))
> (.flush *out*)

(print "Santa saysHoHoHo")

How often do you really want to repeat the same side effect many times
in a row?
Why does it hurt to just say (dotimes [i 100] ...)?
This will not reduce readability dramatically, but is a consistant
use of dotimes. It also does not reduce productivity.
Why make a breaking change for this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to