Rob Spoor wrote:I've re-read the book just a few weeks ago, and yes, it's still very relevant. The only things that I found funny were statements like "interfaces can't have static methods" and "interfaces can't have implementations" - which they can since Java 8.
I would like to have an updated version for tips and tricks for streams, lambdas and other Java 8 language features...
Me too; mainly because I suspect that these new features are likely to get abused.
The docs will tell you what these new features do; but they rarely tell you when (or, maybe more importantly,
why) you would use them. And that's what Effective Java has always been so good at: It's a "why to" book.
For example: When is it worth implementing a 'default' method? I'm sure there are good cases for it, but I'm equally sure that you don't want to do it all the time. After all, the language survived for almost 20 years without them.
Same with streams and lambdas: they look very useful to me; but I'm not sure I'd want to see a program littered with 'em. Java isn't, and never will be, a functional language, but version 8 is starting to look a bit like the early version of C++ - "Java with closures".
So Josh, please tell us why and when.
Winston