Disclaimer: I don't think this is an important issue. I'd like to hear
some wider opinions on this out of interest.

So far I haven't found the nays compelling, but then its not really an
exciting feature either. I tend to come across (dotimes)  where I want
to get a rough feel for the timings on some function:
(time (dotimes [i 10000] (stuff))
I'd benefit more from (time) having an arity 2 version taking the
number of executions desired :P
Again that's not exactly an earth-shattering feature either. Are there
any real use cases for dotimes? It could almost be removed in favour
of (for) only, it is only slightly more verbose.


So far the objections raised against extending dotimes have been:

1) Complexity:
having (dotimes 3 (stuff)) and (dotimes [i 3] (stuff i))
vs always using a binding even when not needed: (dotimes [_ 3]
(stuff))
That's the question in a nutshell really... is it simpler or more
complex?
Having the option doesn't appear to hurt.
(It is not a burden to learn or understand, and is not a breaking
change).

2) Polymorphic arguments are bad:
In general I agree it is wise to be wary, however it wouldn't be a
unique situation:
(find-doc re-string-or-pattern)
(float-array size-or-seq)
(seque n-or-q s)
Numbers and bindings are completely distinguishable in this case.
There would be no runtime hit as the trivial check would be macro time
anyhow.

3) You can write your own like xyz:
Seems irrelevant given Mark has indeed written his own.


Regards,
Tim


--~--~---------~--~----~------------~-------~--~----~
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