Hacker News new | comments | show | ask | jobs | submit login

I can relate to the debugging part. Useless stack traces have been the reason I simply gave up on Clojure.

I wouldn't call them useless, but I guess I'm used to C++, or worse, just a hex stack dump (yay, game consoles). Clojure mangles names somewhat to make them Java-compatible; you can easily do the reverse translation in your head. Still, this could be automated rather easily.

As far as I remember clojure just spit out "This is not a function" or something like that, without any indication where the error occured.

There is a trace macro but it doesn't provide complete traces without explicitly adding every function you want to trace, which becomes tricky very soon. Manual tracing with printf()s like in non-functional languages isn't built-in either. There are half-baked macros for this on blogs if you google hard enough, but that is not the kind of thing that leaves a solid impression of a language.

Maybe I was just working in a non-clojuresque way.

I agree its a problem. I use the repl a lot and bild up the functions and debug with prints witch is ok because you can print anything (not like in VB). I know that they are working on it so I hope it will get better.

For me, however, its not a reason to quit.

I have been working on a fork of Clojure off-and-on that tries to improve the debugging experience (https://github.com/qbg/clojure). How do you think the stack traces could be improved?

This is one example of how to remove uninteresting stack frames from Clojure stack traces. http://j.mp/h3xzdN

Suppose you accidentally put an extra pair of braces deeply inside a function. The message you'll get is something like "could not cast to function" without any meaningful information where this happened.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact