The Definitive Guide to Lambda Expressions "Mastering Java Programming in a Multicore World" describes how the lambda-related features of Java SE 8 will enable Java to meet the challenges of next-generation parallel hardware architectures. The book explains how to write lambdas, and how to use them in streams and in collection processing, providing code examples throughout. You'll learn how to use lambda expressions to take full advantage of performance improvements provided by today's multicore hardware. This Oracle Press book Why lambdas were needed, and how they will change Java programming Syntax of lambda expressions The basic operation of streams and pipelines Using collectors and reduction to end pipelines Creating streams Spliterators, the fork/join framework, and exceptions Examining stream performance with microbenchmarking API evolution using default methods
Good solid overview of the features introduced in Java 8, specifically Lambdas, Streams and Default Methods. This is clearly intended for experienced Java developers making it excellent for those who wish to learn or refresh themselves on these concepts. I particularly like the summary pages of the various API methods around Streams as they'll be far easier to refer to then the online Javadoc.
“Mastering Lambdas: Java Programming in a Multicore World” reads more like a textbook or academic paper than your typical computer book. It was interesting and I learned a lot. It was “boring” though and took me a long time to get through the relatively short book. Luckily, Chapter 1 is available on the publisher's website so you can decide how you feel about the writing style.
It occupies a tricky spot. It introduces lambdas/streams very methodically. However, if you haven't used them yet, I think it would be hard to follow parts of the book. Other parts are great for a beginner though. Like introducing the syntax for lambdas (formally) and excellent diagrams showing what happens in the intermediate operations. If you already know about lambdas, you can learn in more detail though. I think one trouble for beginners is the organization. Chapter 3 and 4 shows examples before explaining.
I liked how the more complicated problems were worked out in stages so you could see how to think. And I learned a few things like preferring Arras.stream() over Stream.of(). The coverage of legacy classes that now have stream APIs was excellent. And I loved the disclaimer about microbenchmarking. Several pages on the issues and caveats before showing results. I also learned about the Blackhole benchmarking API.
I recommend reading another book like “Java 8 for the Really Impatient” before coming back to this one.
--- Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of CodeRanch.
Perfect book for experienced Java programmers. Very focused and in-depth information, not only on how to utilize lambdas, but more importantly the considerations that went into introducing them in Java.