McGraw-Hill Professional wrote:Mastering Lambdas: 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 covers:
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
Spliterators, the fork/join framework, and exceptions
Examining stream performance with microbenchmarking
“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.
I give this book 8 out of 10 horseshoes.
Disclosure: I received a review copy of this book from the publisher for reviewing it on behalf of CodeRanch.