4 ms·
I agree that the exception traces are pretty awful. Having used Clojure for a couple of years now, all I can say is that you do get used to them. Despite the co
by edoloughlin 13y ago
I agree that the exception traces are pretty awful. Having used Clojure for a couple of years now, all I can say is that you do get used to them. Despite the complexity of the libraries and the 'foreign-ness' of the concepts coming from an imperative background, Clojure is fundamentally a simple language/environment.
I've developed a sense for the types of mistakes that I usually make and I tend to scan the stacktrace for my own namespace, ignoring the clojure.* lines[1]. Once I see what line caused the problem, if it's not a typo then it just takes less than a minute to reason about what's going on and find a solution. The REPL helps a lot, because you can make changes on the spot or try out a modified code fragment.
As some others have said here: yes, it is difficult to make the adjustment from an imperative way of thinking but it's really, really worth it once you get there.
[1] You can probably even de-emphasise clojure.lang stacktrace lines in Eclipse using the Grep Console plugin but I'm not sure about this off the top of my head, because the Eclipse console might override stderr output.
- zhemao 13y agoOh, I'm familiar with functional programming. I had played around with Scheme for a bit before moving to Clojure and used Common Lisp and OCaml afterwards. It was always just the terrible stack traces and really long startup times that drove me away.