InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Rich Hickey on Clojure's Features and Implementation

Posted by Werner Schuster on May 26, 2009

Sections
Development,
Architecture & Design
Topics
Dynamic Languages ,
Programming ,
Language ,
Architecture ,
.NET ,
Java ,
Compilers ,
Performance & Scalability ,
Ruby ,
Language Design ,
Runtimes
Tags
Concurrency ,
Clojure ,
Threading ,
LISP ,
STM ,
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 Gresham Paul Posted
  1. Back to top

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

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.