Jump to content

Clojure

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by David.hilton.p (talk | contribs) at 00:53, 5 November 2008 (Language Features). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Clojure
ParadigmMulti-paradigm, Dynamic, Functional
Designed byRich Hickey
DeveloperRich Hickey
First appeared2007
Stable release
20080916 / 2008-09-16
Typing disciplinedynamic, strong
OSCross-platform
LicenseCommon Public License
Websitehttp://clojure.org
Influenced by
Lisp, Java, ML, Haskell, Erlang

Clojure is a dialect of Lisp that runs on the Java Virtual Machine. It is a general-purpose language sporting interactive development, and it encourages a functional programming style that enables simplified multithreaded programming. Clojure honors the code-as-data philosophy and has a sophisticated Lisp macro system.

Philosophy

  • Lisp is a good thing.
  • Functional programming is a good thing.
  • VMs, not OSes, are the platforms of the future.
  • The JVM has a huge set of facilities, both built-in and 3rd-party.
  • Object orientation is overrated.
  • Polymorphism is a good thing.
  • Concurrency and the multi-core are the future.

Syntax

Like any other Lisp, Clojure's syntax is built on S-expressions that are first parsed by a reader before being compiled. Unlike other lisps Clojure's reader supports maps and vectors in addition to lists.

Clojure is not intended to be code-compatible with other dialects of Lisp.

Clojure is a Lisp-1.

Language Features

References

  • "Rationale". Rich Hickey. clojure.org. Retrieved 2008-10-17.