Hacker News new | ask | show | jobs
by nbittich 476 days ago
I tried clojure long time ago, honestly what made me give up is when I saw a java stacktrace in place of a proper error message when learning it. Also the repl was slow. The UX sucked, I wonder if they improved that
4 comments

I used to hate JVM stacktraces but they’re incredibly useful and I miss them when I’m using other ecosystems these days. The way JVM exceptions do “caused by” when an exception is thrown while handling another exception gives so much more information than other languages. It’s also relatively simple to filter out the noise when you want a concise error message: just remove lines that start with a tab.

CIDER (the emacs IDE for Clojure) does a really good job of filtering the stack trace and presenting several views depending on what you care about. L

Usually there is also an error message together with a stack trace. I like stack traces: they are usually more informative than just an error message. I had lost too much time debugging Haskell exceptions where they by default do not come with any stack traces.

The only thing that really sucked is just the documentation. They are overly concise. You end up relying on non-official sources of documentation.

There are no Clojure stacktraces specifically, only JVM/Java ones. Clojure sits closely beside its host so there is no difference. People do complain about stacktraces and they've made some improvements. But they are long because the abstractions run deep and the function you passed in might be on the stack at the very bottom with the actual origination of the cause.
The repl isn't slow, what are you referring to?
Probably referring to startup time. Larger apps solve this with the “reloaded” type of workflow (https://www.cognitect.com/blog/2013/06/04/clojure-workflow-r...)
I would often leave repls running for days so it never seemed to matter.