I initially had the broken links on clojure.org to the documentation listed, but I bugged some people and now it's fixed!
There are clearly a lot of things that are awesome with Clojure, but details like the ones I've listed here can damage the community disproportionately compared the very minor changes needed to fix them. Or in other words: most of the things on this list are probably fairly easy to fix, and will make the experience for newbies a lot better.
I definitely agree with some of the issues listed, such as poor error reporting and the fact that the official documentation is less than adequate.
However, I'm not sure I agree with some of the other complaints. For example, I like the way the built in test works. I see what function I ran, what was the expected result and what the produced result was. I'm not sure how much clearer it can be frankly.
The REPL output is often useful as it gives you more information about the cause of the error. In most cases the line number is sufficient, however sometimes you might want to see the complete stack trace.
Also, this is not an issue when you use a decent editor. For example, Cursive will catch the error and simply print the error message for you.
The editor is the proper place to address this kind of thing, I would want the language to give me as much information as possible and have the editor worry about displaying it in a nice way.
Clojure source code has a lot of commented out code with no explanation. This is unprofessional and makes me suspicious about the entire thing.
The commented code is definitely not a pretty sight, but I certainly can't agree that this alone should make you suspicious of anything. The fact that Clojure is used by lots of companies in production and many successful products have been built with it clearly demonstrates that there's nothing suspect about it.
Also, as a Java developer I don't really see anything obscure about the formatting of the source.
However, I'm not sure I agree with some of the other complaints. For example, I like the way the built in test works. I see what function I ran, what was the expected result and what the produced result was. I'm not sure how much clearer it can be frankly.
Except that's actually not what you get. Take this test as an example: (is (= 4 (+ 2 3)))
What is the "expected value"? It's 4. What did we really get? 5. What is the actual output of this test?
expected: (= 4 (+ 2 3))
actual: (not (= 4 5))
Wtf is that? Super unhelpful. A big problem is that the clojure default test framework doesn't actually separate between expected and the thing that is being tested, so it can't actually print that in a way that is helpful.
I certainly agree that it could be prettier, but it's not wtf worthy in my book. The python example is definitely nicer since it focuses on the part that's different. I think that would certainly be an improvement to do that.
Maybe I need to point out here that I think Clojure is cool and does some very fundamental things inherently right, where most other languages do them wrong.
I get the feeling you're defending Clojure even when I'm pointing out the weak spots. Everything has a thing that is worst, it's just a matter of accepting that and then fixing it so that your favorite language has a worst case that is better than the other languages....
But I do agree with you that test results could be displayed nicer. I'm all for improving the beginner experience and I've been advocating that for a while myself. I just think some of your statements are somewhat hyperbolic.
For example, I 100% agree about error messages being useless, but I don't agree that stack traces are an issue because practically all Clojure editors handle them intelligently.
I think tests could be clearer, but I don't agree that showing expected and the result is some kind of a wtf. I certainly don't agree that some commented code in the Clojure implementation makes the entire thing suspicious.
10
u/kankyo Jan 19 '14
Author here.
I initially had the broken links on clojure.org to the documentation listed, but I bugged some people and now it's fixed!
There are clearly a lot of things that are awesome with Clojure, but details like the ones I've listed here can damage the community disproportionately compared the very minor changes needed to fix them. Or in other words: most of the things on this list are probably fairly easy to fix, and will make the experience for newbies a lot better.