2 options
Clojure for Java developers : transition smoothly from Java to the most widely used functional JVM-based language-- Clojure / Eduardo Díaz.
- Format:
- Book
- Author/Creator:
- Díaz, Eduardo, author.
- Series:
- Community experience distilled.
- Community experience distilled
- Language:
- English
- Subjects (All):
- Clojure (Computer program language).
- Functional programming languages.
- Java (Computer program language).
- Physical Description:
- 1 online resource (156 p.)
- Place of Publication:
- Birmingham : Packt Publishing, 2016.
- Summary:
- Transition smoothly from Java to the most widely used functional JVM-based language – ClojureKey Features[*]Write apps for the multithreaded world with Clojure’s flavor of functional programming[*]Discover Clojure’s features and advantages and use them in your existing projects[*]The book is designed so that you’ll be able put to use your existing skills and software knowledge to become a more effective Clojure developerBook DescriptionWe have reached a point where machines are not getting much faster, software projects need to be delivered quickly, and high quality in software is more demanding as ever. We need to explore new ways of writing software that helps achieve those goals. Clojure offers a new possibility of writing high quality, multi-core software faster than ever, without having to leave your current platform. Clojure for Java developers aims at unleashing the true potential of the Clojure language to use it in your projects. The book begins with the installation and setup of the Clojure environment before moving on to explore the language in-depth. Get acquainted with its various features such as functional programming, concurrency, etc. with the help of example projects. Additionally, you will also, learn how the tooling works, and how it interacts with the Java environment. By the end of this book, you will have a firm grip on Clojure and its features, and use them effectively to write more robust programs.What you will learn[*]Understand the tools for the Clojure world and how they relate to Java tools and standards (like Maven)[*]Learn about immutable data structures, and what makes them feasible for everyday programming[*]Write simple multi-core programs using Clojure's core concepts, like atoms, agents and refs[*]Understand that in Clojure, code is data, and how to take advantage of that fact by generating and manipulating code with macros[*]Learn how Clojure interacts with Java, how the class loaders work and how to use Clojure from Java or the other way around[*]Discover a new, more flexible meaning of polymorphism and understand that OOP is not the only way to get itWho this book is forThis book is intended for Java developers, who are looking for a way to expand their skills and understand new paradigms of programming. Whether you know a little bit about functional languages, or you are just getting started, this book will get you up and running with how to use your existing skills in Clojure and functional programming.
- Contents:
- Cover ; Copyright; Credits; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Getting Started with Clojure ; Getting to know Clojure; Installing Leiningen; Using a REPL; The nREPL protocol; Hello world; REPL utilities and conventions; Creating a new project; Project structure; Creating a standalone app; Using Cursive Clojure; Installing Cursive Clojure; Getting started with Clojure code and data; Lists in Clojure; Operations in Clojure; Functions in Clojure; Clojure's data types; Scalars; Collection data types; Summary; Chapter 2: Namespaces, Packages, and Tests
- Namespaces in ClojurePackages in Clojure; The classpath and the classloader; Back to Clojure namespaces; Playing with namespaces; Creating a new namespace; Working with namespaces on the REPL; Testing in Clojure; Testing from the command line; Testing in IntelliJ; Summary; Chapter 3: Interacting with Java ; Using Maven dependencies; Clojure interop syntax; Creating an object; Calling an instance method; Calling a static method or function; Accessing inner classes; Writing a simple image namespace; Writing the tests; The let statement; Destructuring in Clojure; Sequential destructuring
- Associative destructuringExposing your code to Java; Testing from Groovy; Proxy and reify; Summary; Chapter 4: Collections and Functional Programming ; Basics of functional programming; Persistent collections; Types of collections in Clojure; The sequence abstraction; Specific collection types in Clojure; Vectors; Lists; Maps; Sorted maps and hash maps; Common properties; Sets; Sorted sets and hash sets; Common properties; Union, difference and intersection; Applying functional programming to collections; The imperative programming model; The functional paradigm
- Functional programming and immutabilityLaziness; Summary; Chapter 5: Multimethods and Protocols ; Polymorphism in Java; Multimethods in Clojure; Keyword hierarchies; isa?; parents; descendants; underive; A la carte dispatch functions; Protocols in Clojure; Records in Clojure; Summary; Chapter 6: Concurrency ; Using your Java knowledge; The Clojure model of state and identity; Promises; Pulsar and lightweight threads; Futures; Software transactional memory and refs; Atoms; Agents; Validators; Watchers; core.async; Why lightweight threads?; Goblocks; Channels; Transducers; Summary
- Chapter 7: Macros in Clojure Lisp's foundational ideas; Macros as code modification tools; Modifying code in Java; Modifying code in Groovy; The @ToString annotation; The @TupleConstructor annotation; The @Slf4j annotation; Writing your first macro; Debugging your first macro; Quote, syntax quote, and unquoting; Unquote splicing; Gensym; Macros in the real world; References; Summary; Index
- Notes:
- Includes index.
- Description based on online resource; title from PDF title page (ebrary, viewed July 7, 2016).
- ISBN:
- 9781785280412
- 1785280414
- OCLC:
- 1491309080
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.