
Programming Clojure, Fourth Edition
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Quickly turn complex problems into simple, working solutions using functional programming, safe concurrency, and the expressive tools of Clojure.
Struggling with unnecessary complexity, unmanaged state, and brittle data that's hard to change? Clojure combines the expressiveness of Lisp with the stability and performance of Java into a practical toolkit for creating simple, extensible applications. With immutable data structures, functional programming, and safe concurrency, Clojure makes it easier to write robust, reusable code. This definitive guide, written by members of the Clojure core team, introduces the language's essentials and then shows how to put everything together in real applications. This edition adds practical coverage of project tooling and interactive development and fresh examples of the latest Clojure features.
Build cleaner, more reliable software that can respond to changing requirements over time. Combine Clojure's tools for maximum effectiveness as you work with immutable data, functional programming, and safe concurrency to write programs that solve real-world problems.
Start by getting comfortable with Clojure's concise syntax and its interactive REPL, then quickly move into building with immutable collections and the powerful sequence abstraction. Gain practical fluency with functional techniques such as higher-order functions, recursion, partial application, and memoization. Beyond the basics, learn to manage state with Clojure's reference types, build open and extensible systems using protocols and multimethods, and unlock the power of macros for creating your own language features. Seamless Java interop lets you tap into the vast Java ecosystem without sacrificing clarity or safety.
This edition adds two new chapters on project tooling and interactive development, guiding you through modern workflows with tests, builds, editors, and the REPL at the center of your process. Learn how to set up projects, manage dependencies, and work productively in Clojure's unique interactive style. When you're finished, you'll be able to think in Clojure: express solutions with clarity, leverage concurrency safely, and build real-world applications that are simpler and more maintainable than you thought possible.
What You Need
- Java 8 or newer
- Clojure 1.12 or newer
More details
Persons
Content
- Welcome to Clojure
- Getting Started
- Simplicity and Power in Action
- Clojure Coding Quick Start
- Navigating Clojure Namespaces
- Wrapping Up
- Exploring Clojure
- Reading Clojure
- Functions
- Vars, Bindings, and Namespaces
- Metadata
- Calling Java
- Comments
- Flow Control
- Where's My for Loop?
- Wrapping Up
- Developing Interactively
- The REPL (Read-Eval-Print-Loop)
- Editors
- Structural Editing
- Loading and Evaluating Code
- Dependencies in the REPL
- Wrapping Up
- Data and Functions
- Unifying Data with Sequences
- Everything Is Seq-able
- Using the Sequence Functions
- Lazy and Infinite Sequences
- Clojure Makes Java Seq-able
- Calling Structure-Specific Functions
- Wrapping Up
- Functional Programming
- Functional Programming Concepts
- How to Be Lazy
- Lazier Than Lazy
- Recursion Revisited
- Eager Transformations
- Wrapping Up
- Describing Your Data with Specs
- Defining Specs
- Validating Data
- Validating Functions
- Generative Function Testing
- Wrapping Up
- Intermediate Topics
- State and Concurrency
- Concurrency, Parallelism, and Locking
- Use Atoms for Uncoordinated, Synchronous Updates
- Refs and Software Transactional Memory
- Use Agents for Asynchronous Updates
- Managing Per-Thread State with Vars
- A Clojure Snake
- Wrapping Up
- Protocols and Datatypes
- Programming to Abstractions
- Interfaces
- Protocols
- Datatypes
- Records
- reify
- Metadata Extension
- Wrapping Up
- Multimethods
- Living Without Multimethods
- Defining Multimethods
- Moving Beyond Simple Dispatch
- Creating Ad Hoc Taxonomies
- When Should I Use Multimethods?
- Wrapping Up
- Java Interop
- Creating Java Objects in Clojure
- Calling Clojure From Java
- Exception Handling
- Optimizing for Performance
- Handling Java Streams
- A Real-World Example
- Wrapping Up
- Macros
- When to Use Macros
- Writing a Control Flow Macro
- Making Macros Simpler
- Taxonomy of Macros
- Wrapping Up
- Clojure in Practice
- Project Tooling
- Project Sources and Dependencies
- Running a REPL
- Defining Tests
- Running Tests
- Building and Releasing Libraries
- Compiling Applications
- Wrapping Up
- Building an Application
- Getting Started
- Developing the Game Loop
- Representing Progress
- Implementing Players
- Interactive Play
- Documenting and Testing Your Game
- Farewell
- Project Tooling
- State and Concurrency
- Unifying Data with Sequences
- Getting Started
System requirements
File format: ePUB
Copy protection: Watermark-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reading software that can process the file format ePUB: e.g., Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Before downloading, install the free app Adobe Digital Editions (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Watermark-DRM, a „soft” copy protection. This means that there are no technical restrictions to prevent illegal distribution. However, there is a personalised watermark embedded in the eBook that can be used to identify the purchaser of the eBook in the event of misuse and to provide evidence for legal purposes.
For more information, see our eBook Help page.