It’s week 2 of my clojure journey, so I fall flat-faced into the ‘beginner’ category. I have no prior experience with LISPS, but have done some work on the JVM (Java & a bit of kotlin), and am marginally exposed to functional concepts (albeit via javascript).
So far the actual Clojure coding I’ve done has been limited to exercises (4clojure, koans, exercism) and replicating bits and pieces from books (Living Clojure; Clojure for the Brave & True).
The only real language-level frustration I’ve had so far is just the generic fact of not knowing enough, particularly about the stdlib, to get any momentum. But constantly having to stop to look things up is a given learning any new language or platform.
I think the ‘problem’ of lispy syntax is way overblown, at least for experienced programmers. Once you’ve been coding for a few years, you’re mostly thinking in something nearer to AST’s than the surface-level syntax anyway, and it seems like a non-issue to me to move to a different syntactical structure.
So my main actual frustrations so far have been:
- re-arranging nested forms when I’ve got into a mess with one. This is totally self-inflicted. I ignored (good) advice not to start with paredit, and have more than once spent 10 minutes or so just trying to re-arrange something I’ve just stuffed up.
- not knowing what tools to use, eg. lein with project.clj vs clj with deps.edn. Options with the basics are not useful to a beginner
- not really understanding the relationship between the REPL and the code I’ve connected to it (in Emacs/Cider). Several times I’ve had errors I couldn’t fix, only to find the ‘same’ code worked in my next session. I assume I must have evaluated different groups of forms without quite following the implications
- compiler errors are often obtuse and hard for me to make use of. They’d be impossible if I had zero Java/JVM experience
- official Clojure API documentation tends to be terse and assumes a high level of familiarity with Clojure terminology (this is how it seems to a beginner, anyway).
I notice I’m not listing much there about the language itself, which actually seems rather clear, at least at the toy/puzzle level I’ve been inhabiting so far.
I’ve a feeling I’m going to hit a wall when I get to building real applications, lacking mental templates for the best way to arrange a bunch of functions so they don’t just form higher-level spaghetti architecture. I’ve asked around in a couple of places for excellent codebases (particularly whole apps) to use as exemplars, but haven’t come up with much. I’m wondering if there just might not be many high quality Clojure open source apps around. Still looking though.