Among the more interesting languages that target the JVM as their execution environment are those that support functional-style programming. Scala is perhaps the pre-eminent functional JVM language that combines OO and functional concepts, and also offers many other advanced programming tools that Java lacks. On the other end of the JVM languages spectrum is Clojure, a nascent language that also offers the functional programming style, but in a dynamic format.
Clojure was created by Rich Hickey about a year ago, and he describes Clojure as a dialect of Lisp:
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.
Celebrating Clojure's one-year anniversary, Hickey posted a brief retrospective to the Clojure users' mailing list, highlighting important milestones in the language's evolution:
We're now at 650 members on the Google Group, and have had over
4500 message over the year, 500 messages in the first half of October
alone! ... There are newcomers kicking the tires, people
who've spent enough time to know their way around, and those who,
through their extended experience, really 'get' the model behind
Clojure, and have developed idiomatic sensibilities. In addition, it's
a diverse community, including some Java experts, and some Lisp
experts, with experience in a wide variety of domains, all of which is
being shared too...
[We've] done almost 600 checkins in the past year. Many were small bug
fixes and enhancements, others were significant features like first-class namespaces, in-source docs, gen-class and proxy, primitives
support, ad hoc hierarchies, destructuring, list comprehensions, var
metadata, regex support, zippers, first-class sets, agents, struct
maps, java.util integration, parallel support, etc. All of this
happened in a context of considerable stability and robustness, which
is a testament to the Lisp model of using a small core, with most of
the language provided by independent functions and macros...
Hickey also outlines in the post some of the planned features and directions for Clojure.
What do you think of Clojure? Do you think there is a need for a Lisp-like language on the JVM?