by john2x · 12y ago · 0 comments
One is due to it's declarative nature (which I love), it's quite difficult to get up to speed with unfamiliar code.
The 2nd is due to it's JVM roots. Those stacktraces, man. And when it happens on an anonymous funtion in a not so documented library, ugh. It's like hitting a brick wall.
The first, I can deal with enough practice and Schema/core.typed. Is there any hope for the stacktraces to improve? How do other JVM based languages fare in this regard?
(fn my-name []
(throw (Exception. "boom")))
(Sorry, I don't know Clojure internals well enough to have great answers to your explicit questions.)[Edited: thanks to jerf for pointing out the inconsistency in a term I used.]
i.e.
(= ((fn factorial [x]
(if (<= x 1)
1
(* x (factorial (dec x))))) 5)
120)
Note, this isn't run under TCO (see loop/recur).