by jb1991 · 9y ago · 0 comments
It won't hurt to know something about the underlying environment you work with but you don't have to.
I started using Clojure directly by reading some books on it several years ago. I had tinkered with Common Lisp for a couple months before switching to Clojure. I convinced my company at the time to use full-stack Clojure/Script on a new project, so my experience quickly ramped up from there.
https://8thlight.com/blog/connor-mendenhall/2014/09/12/cloju...
> Caused by: java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword
What's an ISeq? I can guess that' it's part of clojure's implementation from java.lang.IllegalArgumentException, but that's what I'm talking about when saying that clojure isn't a great first language because of how you have to both understand a little bit about clojure and a little bit about java, when it comes to errors and namespaces.
The article you mentioned accurately says this:
> Although Clojure's errors are notoriously unfriendly, they're easy to read with a bit of practice
Once you realize that much of what happens in Clojure is based on data sequences, it becomes clear that an individual keyword is not a sequence, so it was probably used incorrectly somewhere.
That's an interesting article comparing the errors from Ruby with Clojure. They are about the same, the only difference is that Clojure gives you a lot more information in the form of an ugly stack trace. Fortunately, many editors in Clojure automatically hide the stack trace and only show the error.
After you've seen errors a few times in your first week using the language, fixing them becomes second nature. This is one of the tradeoffs using a dynamically typed language: there will be more debugging of runtime problems. In return for that, you spend less time on other things. The fact that there are very successful languages in both the dynamic and static typed camps shows that benefits can be found everywhere.