Hacker News new | ask | show | jobs
by exabrial 22 days ago
I love the idea of clojure and perfect immutability, but holy crap I cannot grok the syntax. My C-trained brain explodes.
6 comments

You get over it really quickly once you start actually using it. I find it basically impossible to read Clojure outside the editor in any meaningful sense.
It's like a light saber instead of a machine gun. Let the bullets come to you.
Lisp is tricky. Pretty much every programmer for whom it's not their very first PL hates it initially, but then there's a time, a threshold after which no other language feels more readable than Lisp.

Using structural editing idioms and the REPL, usually makes the process less vexing.

I think for some people it's an aesthetic knee-jerk reaction and the fact that it's "unusual" for a programming language. It's not like their brains "can't grok" -- it's just syntax after all. People don't tend to have that reaction to xml for some reason. It's data, so it gets a pass. But then this is code-as-data and they have to break that barrier conceptually and then get past the aesthetic knee-jerk reaction.
It took about two weeks for me to be able to read it.

Might as well have been Russian.

Now it's as natural as any other language.

I went through a similar phase decades ago with Common Lisp. It takes a week or two. Now, it’s quite a natural syntax and I see the parens as a huge benefit. I like Clojure syntax even more than CL and Scheme because of the map and vector literals.
It'll take a while but now other programming languages look alien to me. Once you've adopted s-expressions it is hard to go back.