4 ms·
I can relate to the debugging part. Useless stack traces have been the reason I simply gave up on Clojure.
by VMG 16y ago
I can relate to the debugging part. Useless stack traces have been the reason I simply gave up on Clojure.
- pmjordan 16y agoI 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.
- VMG 16y agoAs 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.
- nickik 16y agoI 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.
- qbg 16y agoI have been working on a fork of Clojure off-and-on that tries to improve the debugging experience (https://github.com/qbg/clojure https://github.com/qbg/clojure). How do you think the stack traces could be improved?
- VMG 16y agoSuppose 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.
- kumarshantanu 16y agoThis is one example of how to remove uninteresting stack frames from Clojure stack traces. http://j.mp/h3xzdN http://j.mp/h3xzdN
- gtani 16y agohttp://mmcgrana.github.com/2010/03/clojure-setup.html http://mmcgrana.github.com/2010/03/clojure-setup.html http://clojure-log.n01se.net/date/2010-12-09.html#09:53 http://clojure-log.n01se.net/date/2010-12-09.html#09:53 http://dev.clojure.org/display/design/Stacktraces http://dev.clojure.org/display/design/Stacktraces http://groups.google.com/group/clojure/browse_frm/thread/5b157939e828e11d# http://groups.google.com/group/clojure/browse_frm/thread/5b1... http://dev.clojure.org/jira/browse/CLJ-733 http://dev.clojure.org/jira/browse/CLJ-733