What is it?
- Clojure is a Lisp dialect
- A functional programming language
- Dynamically typed
- Runs on JVM; Provides interoperability with Java
- Amenable to writing multi-threaded (concurrent code)
- ClojureScript uses the same syntax; but compiles into JavaScript (Web pages)
Hello Clojure
(+ 2 3) ; returns a value of 5
(println "Hello") ; returns a value of nil, prints "Hello"
(println "Hello") ; returns a value of nil, prints "Hello"
- Uses parentheses and prefix notation
- Operations in Clj are implemented as functions, macro, or special form
- Special form is recognized by Clj compiler but does not have any source code behind it