Hacker News new | comments | show | ask | jobs | submit login

Clojure has excellent concurrency support.

Clojure has a focus on functional programming, immutable data[1] and the sequence abstraction[2].

Clojure is a Lisp and has most[3] of the super-powerful metaprogramming facilities that you would expect from a Lisp. This means you can, with enough effort, mold the language to suit your needs, even turning it into a completely different language should you wish to do so.

Clojure is not object oriented, though it does allow you to instantiate and create Java objects for the purpose of interacting with Java libraries. Clojure does support OO-like code through its Records/Protocol system.

Clojure has out-of-the-box support for multimethods.

Clojure runs on the JVM and therefore has access to the many many libraries written in Java or other JVM languages.

Pure Clojure code is, as far as I can tell, higher performance than pure CPython code.

PS: Just for the record, I love Python and use it a lot (and have actually been out of touch with Clojure for almost nine months now, sadly). The above are reasons why you may want to learn Clojure - not reasons to drop Python.

[1] The benefits on pure-functional code and immutable data are that it makes concurrency easier and safer and that it makes code easier to reason about as you do not need to consider that 1) side-effects are happening behind your back and 2) the data is being changed elsewhere (which is also why it makes concurrency easier).

[2] Similar idea to Pythons iterables, except IMHO Clojure's sequences are much more a part of the core language than iterables in Python, in that in Clojure most things are sequences, while in Python this isn't the case (though a lot of things are iterables).

[3] I say most because Clojure does not have reader macros




"Pure Clojure code is, as far as I can tell, higher performance than pure CPython code."

Not so here; the author mentions that the Python version is faster (in his blog post).


Adding type hints to the relevant spots in the Clojure code might have helped him in terms of performance.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: