Essential Clojure

Clojure's standard library is packed to the gills with essential functions and macros, and more cool ideas than you can shake a stick at including: concurrency, rich data types, interoperation with Java, and even extending the Clojure language … in Clojure!

Clojure's standard library can be overwhelming … there's just so much in there … over 600 functions, macros, and symbols. Fortunately, you don't need to know every single one (or even most of them) but there's a number of essentials you'll want to master early.

Concurrency: Clojure's concurrency types, combined with immutable data types, removes the teeth gnashing and uncertainty from working with lots of threads that share data. We'll discuss how and when to use Atoms, Agents, and Vars.

Threading Macros: Still think there's too many parenthesis in Clojure? The threading macros (->, -», and friends) let you organize your code into concise, readable flows where you can see exactly what's happening at each step … and often avoid a few levels of parentheses and nesting along the way.

Java Interop: Some say Clojure is a better language for invoking Java methods than Java is.

Records, Types, and Protocols: Sometimes a basic Clojure map doesn't fit the bill; Defining Records and Types and implementing Protocols lets you keep the efficiency of Java without sacrificing the elegance of Clojure.

Macros: So Clojure doesn't quite do what you want? Well, you can change Clojure to fit your needs: and macros are the way you do that. Macros are simultaneously: clever, invaluable, over-used, and a double-edged sword … but you won't want to work in a language without them ever again!


About Howard Lewis Ship

Howard Lewis Ship is the original creator of the Apache Tapestry project, and is a noted expert on Java framework design and developer productivity. He has over twenty years of full-time software development under his belt, with over fifteen years of Java. He cut his teeth writing customer support software for Stratus Computer, but eventually traded PL/1 for Objective-C and NeXTSTEP before settling into Java.

Howard has been developing financial and e-commerce applications in 100% Clojure since 2012.

Howard currently works for Wal-Mart's Global E-Commerce division. He lives in Portland, Oregon with his wife Suzanne, and his children, Jacob and Olivia.

More About Howard »