Book description
Clojure is a practical, general-purpose language that offers expressivity rivaling other dynamic languages like Ruby and Python, while seamlessly taking advantage of Java libraries, services, and all of the resources of the JVM ecosystem. This book helps you learn the fundamentals of Clojure with examples relating it to the languages you know already, in the domains and topics you work with every day. See how this JVM language can help eliminate unnecessary complexity from your programming practice and open up new options for solving the most challenging problems.
Clojure Programming demonstrates the language’s flexibility by showing how it can be used for common tasks like web programming and working with databases, up through more demanding applications that require safe, effective concurrency and parallelism, data analysis, and more. This in-depth look helps tie together the full Clojure development experience, from how to organize your project and an introduction to Clojure build tooling, to a tutorial on how to make the most of Clojure’s REPL during development, and how to deploy your finished application in a cloud environment.
- Learn how to use Clojure while leveraging your investment in the Java platform
- Understand the advantages of Clojure as an efficient Lisp for the JVM
- See how Clojure is used today in several practical domains
- Discover how Clojure eliminates the need for many verbose and complicated design patterns
- Deploy large or small web applications to the cloud with Clojure
Table of contents
- Preface
-
1. Down the Rabbit Hole
- Why Clojure?
- Obtaining Clojure
- The Clojure REPL
- No, Parentheses Actually Won’t Make You Go Blind
- Expressions, Operators, Syntax, and Precedence
- Homoiconicity
- The Reader
- Namespaces
- Symbol Evaluation
-
Special Forms
- Suppressing Evaluation: quote
- Code Blocks: do
- Defining Vars: def
- Local Bindings: let
- Destructuring (let, Part 2)
- Creating Functions: fn
- Conditionals: if
- Looping: loop and recur
- Referring to Vars: var
- Java Interop: . and new
- Exception Handling: try and throw
- Specialized Mutation: set!
- Primitive Locking: monitor-enter and monitor-exit
- Putting It All Together
- This Is Just the Beginning
-
I. Functional Programming and Concurrency
- 2. Functional Programming
- 3. Collections and Data Structures
-
4. Concurrency and Parallelism
- Shifting Computation Through Time and Space
- Parallelism on the Cheap
- State and Identity
- Clojure Reference Types
- Classifying Concurrent Operations
- Atoms
- Notifications and Constraints
- Refs
- Vars
- Agents
- Using Java’s Concurrency Primitives
- Final Thoughts
-
II. Building Abstractions
- 5. Macros
- 6. Datatypes and Protocols
- 7. Multimethods
-
III. Tools, Platform, and Projects
- 8. Organizing and Building Clojure Projects
- 9. Java and JVM Interoperability
- 10. REPL-Oriented Programming
-
IV. Practicums
- 11. Numerics and Mathematics
- 12. Design Patterns
- 13. Testing
- 14. Using Relational Databases
- 15. Using Nonrelational Databases
- 16. Clojure and the Web
- 17. Deploying Clojure Web Applications
- V. Miscellanea
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Clojure Programming
- Author(s):
- Release date: April 2012
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449394707
You might also like
book
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
book
Software Engineering at Google
Today, software engineers need to know not only how to program effectively but also how to …
book
Head First Design Patterns, 2nd Edition
You know you don’t want to reinvent the wheel, so you look to design patterns—the lessons …
book
Clojure: High Performance JVM Programming
Explore the world of lightning fast Clojure apps with asynchronous channels, logic, reactive programming, and more …