, ,

Programming Clojure

Specificaties
Paperback, 286 blz. | Engels
Pragmatic Bookshelf | 3e druk, 2018
ISBN13: 9781680502466
Rubricering
Hoofdrubriek : Computer en informatica
Pragmatic Bookshelf 3e druk, 2018 9781680502466
Gratis verzonden | Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

Drowning in unnecessary complexity, unmanaged state, and tangles of spaghetti code? In the best tradition of Lisp, Clojure gets out of your way so you can focus on expressing simple solutions to hard problems. Clojure cuts through complexity by providing a set of composable tools--immutable data, functions, macros, and the interactive REPL. Written by members of the Clojure core team, this book is the essential, definitive guide to Clojure. This new edition includes information on all the newest features of Clojure, such as transducers and specs.

Clojure joins the flexibility and agility of Lisp with the reach, stability, and performance of Java. 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 reading and understanding Clojure syntax and see how Clojure is evaluated. From there, find out about the sequence abstraction, which combines immutable collections with functional programming to create truly reusable data transformation code. Clojure is a functional language; learn how to write programs in a functional style, and when and how to use recursion to your advantage. Discover Clojure's unique approach to state and identity, techniques for polymorphism and open systems using multimethods and protocols, and how to leverage Clojure's metaprogramming capabilities via macros. Finally, put all the pieces together in a real program.

New to this edition is coverage of Clojure's spec library, one of the most interesting new features of Clojure for describing both data and functions. You can use Clojure spec to validate data, destructure data, explain invalid data, and generate large numbers of tests to verify the correctness of your code.

With this book, you'll learn how to think in Clojure, and how to take advantage of its combined strengths to build powerful programs quickly.

What You Need:
- Java 6 or higher
- Clojure 1.9

Specificaties

ISBN13:9781680502466
Taal:Engels
Bindwijze:paperback
Aantal pagina's:286
Druk:3

Over Stuart Halloway

Stuart Halloway is a co-founder and CEO of Relevance, Inc. Relevance provides development, consulting, and training services based around agile methods and leading-edge technologies such as Ruby and Clojure. Stuart has authored several other books including 'Component Development for the Java Platform and Rails for Java Developers'.

Andere boeken door Stuart Halloway

Over Aaron Bedra

Aaron Bedra is a member of Clojure/core and a developer at Relevance, Inc. where he spends his time as a tech lead, speaker and author. He is a frequent contributor to the Clojure language and its supporting libraries as well as an active member of the Clojure community. Aaron has led the development of several commercial Clojure projects.

Andere boeken door Aaron Bedra

Inhoudsopgave

Acknowledgments
Introduction
Who This Book Is For
What’s in This Book
How to Read This Book
Notation Conventions
Web Resources and Feedback
Downloading Sample Code

1. Getting Started
Simplicity and Power in Action
Clojure Coding Quick Start
Navigating Clojure Libraries
Wrapping Up

2. Exploring Clojure
Reading Clojure
Functions
Vars, Bindings, and Namespaces
Metadata
Calling Java
Comments
Flow Control
Where’s My for Loop?
Wrapping Up

3. Unifying Data with Sequences
Everything Is a Sequence
Using the Sequence Library
Lazy and Infinite Sequences
Clojure Makes Java Seq-able
Calling Structure-Specific Functions
Wrapping Up

4. Functional Programming
Functional Programming Concepts
How to Be Lazy
Lazier Than Lazy
Recursion Revisited
Eager Transformations
Wrapping Up

5. Specifications
Defining Specs
Validating Data
Validating Functions
Generative Function Testing
Wrapping Up

6. State and Concurrency
Concurrency, Parallelism, and Locking
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
Wrapping Up

7. Protocols and Datatypes
Programming to Abstractions
Interfaces
Protocols
Datatypes
Records
reify
Wrapping Up

8. Macros
When to Use Macros
Writing a Control Flow Macro
Making Macros Simpler
Taxonomy of Macros
Wrapping Up

9. Multimethods
Living Without Multimethods
Defining Multimethods
Moving Beyond Simple Dispatch
Creating Ad Hoc Taxonomies
When Should I Use Multimethods?
Wrapping Up

10. Java Interop
Creating Java Objects in Clojure
Calling Clojure From Java
Exception Handling
Optimizing for Performance
A Real-World Example
Wrapping Up

11. Building an Application
Getting Started
Developing the Game Loop
Representing Progress
Implementing Players
Interactive Play
Documenting and Testing Your Game
Farewell

Bibliography

Net verschenen

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Programming Clojure