InfoQ

News

Rich Hickey on Clojure's Features and Implementation

Posted by Werner Schuster on May 26, 2009

Community
Java,
.NET,
Architecture,
Ruby
Topics
Compilers ,
Performance & Scalability ,
Programming ,
Language Design ,
Runtimes ,
Dynamic Languages ,
Language
Tags
Concurrency ,
LISP ,
STM ,
Threading ,
Clojure ,
Scalability

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".

(great 'stuff) by Paul Gresham Posted Jun 3, 2009 2:13 AM
  1. Back to top

    (great 'stuff)

    Jun 3, 2009 2:13 AM by Paul Gresham

    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).

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.