This may seem superficial, but Clojure's usability is a problem. The source-code itself is hurt by the same thing that makes it strong: homogeneity. Even at a superficial level, skimming with the eye, closure code looks strange. It is exactly the same problem that markup that is all divs has when compared to markup that uses common top-level markup. It's hard for the eye to pick out what's important, and what's going on. In addition, indentation rules are not agreed upon and it's a bit stutter stop. (I actually think this is a worse problem then the "inside out" problem).
Aha! I just had a really good idea! Let's call it "Clojure folding". It's like code-folding only instead of hiding lines, you pull up all the code into one line. Some of the internals may be elided - and revealed with a tooltip.
I also like the idea of coloring the entire content of the parens, so that you can embed a large item and then clearly see that you are now back in the containing list. Indentation doesn't do a good enough job, nor do rainbow parens. Further, you'd get a good intuitive sense of place in the code if you have a consistent series of colors. Emotionally, you'd know that if you're typing read you're like 6 layers deep - and that's really deep, in the danger zone, and you probably want to pull some stuff out into definitions.
Chris Granger, feel free to include these ideas in Light Table.
We have been using Clojure for a product for about 9 months now, and in my experience, I have no trouble identifying what different blocks of code do. It may depend on proper syntax highlighting, but I think one of the keys is that there is so little boilerplate in Clojure that all of the code is important. You're not skimming over getters and setters, assignment of constructor parameters to the object, or some of the other things your eyes tend to automatically skip when reading, say, Java or Python. It tends to be pure logic or pure data, with very little else in the way.
These seem like standard criticisms of lisps that have been raised for decades. I dont know the responses or solutions, but surely they exist in abundance on the interwebs.
Comments
This may seem superficial, but Clojure's usability is a problem. The source-code itself is hurt by the same thing that makes it strong: homogeneity. Even at a superficial level, skimming with the eye, closure code looks strange. It is exactly the same problem that markup that is all divs has when compared to markup that uses common top-level markup. It's hard for the eye to pick out what's important, and what's going on. In addition, indentation rules are not agreed upon and it's a bit stutter stop. (I actually think this is a worse problem then the "inside out" problem).
Aha! I just had a really good idea! Let's call it "Clojure folding". It's like code-folding only instead of hiding lines, you pull up all the code into one line. Some of the internals may be elided - and revealed with a tooltip.
I also like the idea of coloring the entire content of the parens, so that you can embed a large item and then clearly see that you are now back in the containing list. Indentation doesn't do a good enough job, nor do rainbow parens. Further, you'd get a good intuitive sense of place in the code if you have a consistent series of colors. Emotionally, you'd know that if you're typing read you're like 6 layers deep - and that's really deep, in the danger zone, and you probably want to pull some stuff out into definitions.
Chris Granger, feel free to include these ideas in Light Table.
We have been using Clojure for a product for about 9 months now, and in my experience, I have no trouble identifying what different blocks of code do. It may depend on proper syntax highlighting, but I think one of the keys is that there is so little boilerplate in Clojure that all of the code is important. You're not skimming over getters and setters, assignment of constructor parameters to the object, or some of the other things your eyes tend to automatically skip when reading, say, Java or Python. It tends to be pure logic or pure data, with very little else in the way.
The problem is that you don't have cues about what you're looking for. Keywords and actual syntax give a lot of those cues.
These seem like standard criticisms of lisps that have been raised for decades. I dont know the responses or solutions, but surely they exist in abundance on the interwebs.
I'd venture to say that it's only hard because you're not used to it. When I look at Clojure source code I don't find it at all difficult to read.
In fact, now that I think about it, I don't think there's any language I'd prefer to read over Clojure.