This post is a book review (as part of O'Reilly Blogger Program) of the following book:
And if you want to understand Generics, this is the book to get and read. Look no further. The treatment of Generics has not changed (and perhaps will not change) across Java releases. What was true in 2006 about them will be true for quite some time (with minor improvements). And both Naftalin and Wadler have done an exceedingly good job of providing a thorough, lively and almost perfect treatment of this arguably the most divisive Java language feature.
The prerequisite to reading this book (like, perhaps any other book) is to look at both Generics as a concept and their particular implementation adopted by the Java Platform with an open mind. If you have preconcived notions about this (which is not bad), this book is not for you. You should then be on the Java Community Process (JCP) mailing list about Generics.
I appreciate this book mainly because it tries to "inform", not "impress". Many (even popular) technical books tend to do the opposite. With lucid examples, the book helps getting to the bottom of the "whys". It also brings out the synergy between the Java 5 language features that makes the whole greater than just the sum of its parts. After/while reading the book, you might see how the controversial autoboxing/unboxing, varargs methods, the foreach loop work in unison to deliver toward a common goal -- typesafe collections of Java objects.
It's likely that you just hate the compile-time type safety. Perhaps you come from a refreshing and liberal dynamic scripting language like JavaScript and believe that compile-time type safety does not alleviate you of testing your code. You should then consume Generics as a necessary evil when programming in Java. But even then, if you are willing to accept that type safety has some benefits especially in the context of the Java programming language, read this book.
- Name: Java Generics
- Authors: Maurice Naftalin, Philip Wadler
- Released: 2006
And if you want to understand Generics, this is the book to get and read. Look no further. The treatment of Generics has not changed (and perhaps will not change) across Java releases. What was true in 2006 about them will be true for quite some time (with minor improvements). And both Naftalin and Wadler have done an exceedingly good job of providing a thorough, lively and almost perfect treatment of this arguably the most divisive Java language feature.
The prerequisite to reading this book (like, perhaps any other book) is to look at both Generics as a concept and their particular implementation adopted by the Java Platform with an open mind. If you have preconcived notions about this (which is not bad), this book is not for you. You should then be on the Java Community Process (JCP) mailing list about Generics.
I appreciate this book mainly because it tries to "inform", not "impress". Many (even popular) technical books tend to do the opposite. With lucid examples, the book helps getting to the bottom of the "whys". It also brings out the synergy between the Java 5 language features that makes the whole greater than just the sum of its parts. After/while reading the book, you might see how the controversial autoboxing/unboxing, varargs methods, the foreach loop work in unison to deliver toward a common goal -- typesafe collections of Java objects.
It's likely that you just hate the compile-time type safety. Perhaps you come from a refreshing and liberal dynamic scripting language like JavaScript and believe that compile-time type safety does not alleviate you of testing your code. You should then consume Generics as a necessary evil when programming in Java. But even then, if you are willing to accept that type safety has some benefits especially in the context of the Java programming language, read this book.