Clojure has complicated error messages

(written by Lawrence Krubner, however indented passages are often quotes)

Some interesting criticism of Clojure:

This connection to Java also turned out to be an issue with having clear error messages. For instance, I misread the docs for the ffirst function, thinking it took the second item from a sequence instead of being caar (if you don’t know what caar is, don’t worry about it). When I tried to do (ffirst [0 1]) to get at 1, the error message was like this:

Exception in thread “main” java.lang.IllegalArgumentException: Don’t know how to create ISeq from: java.lang.Integer (temp.clj:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.load(Compiler.java:5857)
at clojure.lang.Compiler.loadFile(Compiler.java:5820)
at clojure.main$load_script.invoke(main.clj:221)
at clojure.main$script_opt.invoke(main.clj:273)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.lang.Var.invoke(Var.java:365)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: Don’t know how to create ISeq from: java.lang.Integer
at clojure.lang.RT.seqFrom(RT.java:471)
at clojure.lang.RT.seq(RT.java:452)
at clojure.lang.RT.first(RT.java:540)
at clojure.core$first.invoke(core.clj:53)
at clojure.core$ffirst.invoke(core.clj:94)
at user$eval1.invoke(temp.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
… 10 more
What line did the error happen at? If you don’t know you need to ignore the traceback in the compiler that the error caused, you might think line 0 which is obviously wrong. But if you look at the triggering exception (the second one listed) you will notice it is in fact line 1, but only if you read down to the sixth line of the traceback. That gets really annoying really fast. You also need to realize that ISeq represents the sequence interface within Clojure along with knowing what java.lang.Integer is (which is obvious in this example, but not if it happened to be some obscure Java class).

Source