
- •Contents
- •Foreword
- •Acknowledgments
- •Preface
- •Who This Book Is For
- •What Is in This Book
- •How to Read This Book
- •Notation Conventions
- •Web Resources and Feedback
- •Downloading Sample Code
- •Getting Started
- •Why Clojure?
- •Clojure Coding Quick Start
- •Exploring Clojure Libraries
- •Introducing Lancet
- •Wrapping Up
- •Exploring Clojure
- •Forms
- •Reader Macros
- •Functions
- •Vars, Bindings, and Namespaces
- •Flow Control
- •Metadata
- •Wrapping Up
- •Working with Java
- •Calling Java
- •Optimizing for Performance
- •Creating and Compiling Java Classes in Clojure
- •Exception Handling
- •Adding Ant Projects and Tasks to Lancet
- •Wrapping Up
- •Unifying Data with Sequences
- •Everything Is a Sequence
- •Using the Sequence Library
- •Clojure Makes Java Seq-able
- •Adding Properties to Lancet Tasks
- •Wrapping Up
- •Functional Programming
- •Functional Programming Concepts
- •How to Be Lazy
- •Lazier Than Lazy
- •Recursion Revisited
- •Wrapping Up
- •Concurrency
- •The Problem with Locks
- •Refs and Software Transactional Memory
- •Use Atoms for Uncoordinated, Synchronous Updates
- •Use Agents for Asynchronous Updates
- •Managing Per-Thread State with Vars
- •A Clojure Snake
- •Making Lancet Targets Run Only Once
- •Wrapping Up
- •Macros
- •When to Use Macros
- •Writing a Control Flow Macro
- •Making Macros Simpler
- •Taxonomy of Macros
- •Making a Lancet DSL
- •Wrapping Up
- •Multimethods
- •Living Without Multimethods
- •Moving Beyond Simple Dispatch
- •Creating Ad Hoc Taxonomies
- •When Should I Use Multimethods?
- •Adding Type Coercions to Lancet
- •Wrapping Up
- •Clojure in the Wild
- •Automating Tests
- •Data Access
- •Web Development
- •Farewell
- •Editor Support
- •Bibliography
- •Index
- •Symbols

Appendix A
Editor Support
Editor support for Clojure is evolving rapidly, so some of the information here may be out-of-date by the time you read this. Check the archives of the mailing list1 for recent announcements.
Clojure code is concise and expressive. As a result, editor support is not quite as important as for some other languages. However, you will want an editor than can at least indent code correctly and can match parentheses.
While writing the book, I used Emacs plus Jeffrey Chu’s clojure-mode, available at http://github.com/jochu/clojure-mode. Emacs support for Clojure is quite good, but if you are not already an Emacs user, you might prefer to start with an editor you are familiar with from among these:
Editor |
Project Name |
Project URL |
Eclipse |
clojure-dev2 |
http://code.google.com/p/clojure-dev/ |
Emacs |
clojure-mode |
http://github.com/jochu/clojure-mode |
IntelliJ IDEA |
La Clojure |
http://plugins.intellij.net/plugin/?id=4050 |
jEdit |
jedit modes |
http://github.com/djspiewak/jedit-modes/tree/master/ |
NetBeans |
enclojure |
http://enclojure.org |
TextMate |
clojure-tmbundle |
http://github.com/nullstyle/clojure-tmbundle |
Vim |
Gorilla |
http://kotka.de/projects/clojure/gorilla.html |
Vim |
VimClojure |
http://kotka.de/projects/clojure/vimclojure.html |
Bill Clementson has written a quick overview that includes setting up Clojure, Emacs support, and debugging with JSwat.3
1.http://groups.google.com/group/clojure
2.http://code.google.com/p/clojure-dev/
3.http://bc.tech.coop/blog/081023.html
Prepared exclusively for WG Custom Motorcycles

Appendix B
Bibliography
[Goe06] |
Brian Goetz. Java Concurrency in Practice. Addison-Wesley, |
|
Reading, MA, 2006. |
[Hof99] |
Douglas R. Hofstadter. Gödel, Escher, Bach: An Eternal |
|
Golden Braid. Basic Books, New York, 20th anniv edition, |
|
1999. |
[McC06] |
Steve McConnell. Software Estimation: Demystifying the |
|
Black Art. Microsoft Press, Redmond, WA, 2006. |
Prepared exclusively for WG Custom Motorcycles