BT

Rich Hickey on Clojure's Features and Implementation

by Werner Schuster on May 26, 2009 |

In this interview taped at QCon London 2009 Rich Hickey talks about Clojure, shortly before the 1.0 release.

The interview covers many of the interesting aspects of Clojure, particularly its support for concurrency. Rich explains Clojure's model of Software Transactional Memory (STM), which uses the concept of Multiversion concurrency control (MVCC).
But STM is only one way to use concurrency; Clojure also supports many other concurrency primitives, such as Agents (not to be confused with Actors - the difference is explained in the interview).
Next to the existing concurrency primitives, Rich also explains his ideas for a new one, which will make it easier to use Locks, maybe allowing to define acquisition order or other properties.

Developers familiar with mainstream OOP languages and interested in Clojure will be particularly interested in Clojure's programming model. Clojure supports Java's OOP model and can interact seamlessly with Java libraries and OOP concepts. Idiomatic Clojure code, however, doesn't rely on the OOP concepts of languages like Java or C#. Runtime polymorphism is achieved through multimethods which is integrated with the Java class system, but can be made much more flexible with custom dispatch methods. The interview discusses the reasons behind and advantages of this approach in detail.

Finally, the discussion also touches the topic of performance. Clojure compiles to Java bytecodes and also has advantages over other dynamic languages, in that it allows to avoid polymorphism when it's not needed. It also allows arithmetic to be as fast as normal Java code (ie. written in the Java language), as long as certain rules are obeyed.

InfoQ has covered Clojure previously, a good overview of many aspects of the system is Rich's talk at the JVM Summit 2008.

Watch "Rich Hickey on Clojure".

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

(great 'stuff) by Gresham Paul

Thanks Rich & Werner. For me, Clojure is the most exciting technology out there today. Exciting in itself, but I also can't wait to see what people do with it (are able to do with it). It's certainly the first viable alternative for moving 'hard' problems off of common lisp and the rich libraries of Java are definitely attractive. Would have liked some information on performance of multi-dimensional arrays (an Achilles heel for Java).

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT