spec.test/instrument doesn't check the return value of spec'd functions and 
according to the spec guide this is because we should be checking function 
implementations at testing time, not development time. It seems to me that 
adding :ret and :fn checks to instrumented functions would be worthwhile 
even though tests are a better place to do those checks - since 
instrumentation is meant to be turned off in production the performance hit 
doesn't matter, and since we're already verifying that the arguments 
conform to spec, why not check the return value as well? A benefit would be 
that if we haven't yet written (or won't write) generators and tests, we 
still get a confidence increase about our instrumented functions' return 
values. 
I'm sure this was considered, so I'm just wondering if "do that in your 
tests" is the entire reason for this design choice.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to