Tuesday, November 4, 2008

Clojure: a LISP that has a chance

Clojure is an interesting new language. Here's the executive summary:

Clojure is a dynamic programming language that targets the Java Virtual Machine. It is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Every feature supported by Clojure is supported at runtime. Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection.

Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system. Clojure is predominantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded designs. — www.clojure.org

Each of the key features is exciting to me, a functional LISP that integrates closely with the JVM and has baked-in concurrency. What's more, I think Clojure has a chance at making it big. Here's why:

  • Unique Vision. I don't think any new language can survive for long, unless it has a unique vision. Clojure's unique vision is to bring together a mix of performant, immutable data stuctures, baked-in concurrency, functional style, and close integration with the JVM.
  • JVM Integration. Rich Hickey had the incredible foresight to see the JVM as a platform to be embraced closely. This means that not only can you leverage 100% of existing Java code, but your Clojure code compiles to Java bytecode and benefits from the HotSpot JVM's dynamic optimizations. Compare that to a "from scratch" language that takes years to get a diverse set of libraries and an optimized implementation.
  • Benevolent Dictator. I have always thought that a new LISP (or any new language for that matter) needs a Benevolent Dictator. The BD is the friendly face of the community and sets the tone for how people treat each other. But more importantly the BD is a dictator who has a strong vision for the language, and will say "no" to feature requests that don't line up with his vision. This is Rich Hickey, friendly and open to suggestion, but not afraid to say "no."

If any of this sounds interesting to you, then check out the homepage. The quickest and easiest way to get involved in the community is to join the Google Group. Also, if you're into IRC, then check out #clojure on irc.freenode.net.

I am excited about the future of Clojure, and have really enjoyed working with it so far.

No comments: