why not even go a bit further and add a tiny warning with regards to
evaluating macros as well? I mean I don't know about you guys but I've
not been 'burned' before when trying to use macros inside macros and the
error message is not immediately obvious what it means...it does say
that the arguments should be in binding vector but it took me a good 10
min to realise what is happening....
anyway there are little pockets of clojure wisdom all over the place and
I think it would be best having a 'common traps and pitfalls' somewhere
centrally...
Jim
On 15/06/12 00:02, Andy Fingerhut wrote:
On Jun 14, 2012, at 7:59 AM, Jim - FooBar(); wrote:
well, no... :-)
Jim
On 14/06/12 15:52, David Nolen wrote:
On Thu, Jun 14, 2012 at 10:39 AM, Jim - FooBar();
<jimpil1...@gmail.com <mailto:jimpil1...@gmail.com>> wrote:
Evaluates x then calls all of the methods and functions with the
value of x supplied at the front of the given arguments
that's in the docstring for doto. but dotimes is not a method or a
function is it? :)
David, I think that Jim's point is that dotimes is a macro, not a
method or a function, and yet the dotimes form is still being
"modified" by doto before it is compiled and executed.
The current documentation for doto says it does this for "methods and
functions", but does not mention macros, which could lead one to
infer (incorrectly) that doto does *not* make such modifications to
macro invocations.
I suspect Jim's concern would be addressed if the documentation for
doto were made more accurate, e.g. in the sentence:
"Evaluates x then calls all of the methods and functions with
the value of x supplied at the front of the given arguments."
replace the phrase "calls all of the methods and functions" with
something like "evaluates all forms"
Andy
--
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
Note that posts from new members are moderated - please be patient
with your first post.
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
--
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
Note that posts from new members are moderated - please be patient with your
first post.
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