Why Some of important java 8 features are not included in java 8 in action

Peddi Kristipati

Greenhorn

Posts: 2

posted 3 years ago

Thanks to the Manning publishers and Authors for another excellent in " ... in Action" Series.

Why the Java 8 in action book does not cover the following important features in "PART III: EFFECTIVE JAVA 8 PROGRAMMING" of the book
1) Introduction of Optional type to avoid NullPointerException ( fatal run time issue in java so far)
2) Compact Profiles
3) Nashorn java script engine
4) Dedicated chapter for the new Data and Time APIs instead of an appendix.
--
Thanks
Peddi

Raoul Gabriel

Author
Greenhorn

Posts: 20

6

posted 3 years ago

2

Hi Peddi,

Thanks for encouragements!

To address your concerns -- we actually have a whole chapter dedicated to using Optional to reduce null pointer exceptions and design better APIs. It is chapter 9.

We decided to include the new Java date and time API as an appendix because the focus of our book is about teaching the functional features/ideas adopted by Java 8 and show how you can write better code with them.

Compact profiles and Nashorn are updates to the JDK rather the language itself. We may have a few words about them in Appendix.

Raoul Gabriel wrote:We decided to include the new Java date and time API as an appendix because the focus of our book is about teaching the functional features/ideas adopted by Java 8 and show how you can write better code with them.

I think that using the new date/time API will help you write better code. I've played around with its classes, and I find them a lot easier to use than Date and Calendar. I would very much expect an entire chapter on it.

Peddi, you may want to read "Java SE 8 for the really impatient" as well as "Java 8 in Action". I found its chapters on the date/time API and Nashorn quite good.

Rob Spoor wrote: I think that using the new date/time API will help you write better code. I've played around with its classes, and I find them a lot easier to use than Date and Calendar. I would very much expect an entire chapter on it.

Rob, agreed! It will be a proper chapter that goes in detail over the new Date/time API. It's just that we placed it at the end of the book (as an Appendix) to have a natural flow in the book (from lambdas to streams to functional features to FP).

Peddi Kristipati

Greenhorn

Posts: 2

posted 3 years ago

Thank you very much for the clarifications.

Raoul Gabriel

Author
Greenhorn

Posts: 20

6

posted 3 years ago

1

By the way, we've had a discussion based on your feedback. We've decided to have a chapter on the new date and time API instead of an Appendix.
It will come under Part III "Effective Java 8 programming"!