Re:Results of the Grand C++ Error Explosion Competition
by mschaef on Monday January 27, 2014 @03:19PM
(#7132910)
The first line of the error message tells you where and what the error is, almost exactly:
... Don't know how to create ISeq from: clojure.lang.Symbol, compiling:(hello.clj:5:3)
It's true that the full interpretation of the error message requires some experience with the language (ISeq? Symbol?), but when is that not the case? Consider this one character typo in a Java file: voidx displayMessage(String message);
javac produces an error message that's just about as opaque as what Clojure produces in your example. [ERROR] ... MessageSink.java:[5,4] error: cannot find symbol
Conversely, if I leave an open brace in Java source, I get the following kind of error from javac: [ERROR] ... ConsoleMessageSink.java:[12,1] error: reached end of file while parsing
If I leave an open form in Clojure, it at least tells me the location of the form I left open: Exception in thread "main" java.lang.RuntimeException: EOF while reading, starting at line 18, compiling:(toto/data.clj:255:1)
(Of course, thanks to paredit-mode, I had to play a minor trick on my editor to get it to let me even introduce that error in the first place.)
I do not agree, but please note my comment isn't talking about "running" stack traces here it's talking about the compiler blowing up on what is essentially a syntax error:
note how `foo` is bare rather than in a vector. Put that in a script, `clj -m` it Yeah… the third time around you might instantly know what it is, the first time around when it's a few levels down a type method not so much.