Re:How practical is Clojure?
by johnfn on Tuesday September 06, 2011 @03:38AM
(#2964566)
I am familiar with stack traces, and it's certainly true that with enough experience you can solve a majority of errors just by analyzing the stack trace. But I seemed to run into strange edge cases where the stack trace never mentioned my source file, or would only say line 0. (You mentioned that that could be because I sent the function to the REPL, which is something I never considered! I will definitely have to go back and check, but I think that there were times when that was not the case.)
> What would you suggest to improve the debugging/error situation?
The easiest possible improvement, and something I might write soon, is a simple stack trace parser that would extract only the relevant information. If Clojure errors said "Probable error at this line" first, and then gave me the stack trace after, that would be a lot more user friendly, especially for beginners. And it seems pretty straightforward to parse out lines that have the current file name in them, etc.
> What would you suggest to improve the debugging/error situation?
The easiest possible improvement, and something I might write soon, is a simple stack trace parser that would extract only the relevant information. If Clojure errors said "Probable error at this line" first, and then gave me the stack trace after, that would be a lot more user friendly, especially for beginners. And it seems pretty straightforward to parse out lines that have the current file name in them, etc.