I've been taking a look at Clojure lately and I stumbled upon this post on Stackoverflow that indicates some projects following best practices, and overall good Clojure code. I wanted to get my head around the language after reading some basic tutorials so I took a look at some "real-world" projects.
After looking at ClojureScript and Compojure (two the the aforementioned "good" projects), I just feel like Clojure is a joke. I don't understand why someone would pick Clojure over say, Ruby or Python, two languages that I love and have such a clean syntax and are very easy to pick up whereas Clojure uses so much parenthesis and symbols everywhere that it ruins the readability for me.
I think that Ruby and Python are beautiful, readable and elegant. They are easy to read even for someone who does not know the language inside out. However, Clojure is opaque to me and I feel like I must know every tiny detail about the language implementation in order to be able to understand any code.
So please, enlighten me!
- What is so good about Clojure?
- What is the absolute minimum that I should know about the language in order to appreciate it?
I don't understand why someone would pick Clojure over say, Ruby or Python
- it runs on the jvm and can use the entire java library.... have such a clean syntax
arguably, lisp like functional languages have a very clean syntax and structure, its just one most people aren't used to. – Dec 11 '12 at 21:12few
symbols outside of parenthesis compared to many languages, and almost no reserved words. The reason you find it unreadable is because it's a totally new paradigm and works in a fundamentally different way than a typical Object Oriented language. Give it some time and power through. – KChaloux Dec 12 '12 at 13:54[a: 1, b: [2,3]]
etc. Contrast this to "Commands". Syntax rules are really annoying and complicated. Lisp and Clojure's decision is to reduce all syntax to that of data description. This turns out to be really powerful. As a Web developer, you usually deal with HTML/XML, CSS, Javascript/JSON. All have different Syntax. See https://github.com/Prismatic/dommy for a solution that only uses only Clojure syntax to do all these things. It also scales well with a growing codebase. – wirrbel May 17 '13 at 21:38let
make it easier to read than Common Lisp'slet
. – Mars Jul 25 '17 at 13:59