Java 8 Friday
Every Friday, we’re showing you a couple of nice new tutorial-style Java 8 features, which take advantage of lambda expressions, extension methods, and other great stuff. You’ll find the source code on GitHub.
For the last two Fridays, we’ve been off for our Easter break, but now we’re back with another fun article:
Let’s Deprecate Those Legacy Libs
Apart from Lambdas and extension methods, the JDK has also been enhanced with a lot of new library code, e.g. the Streams API and much more. This means that we can critically review our stacks and – to the great joy of Doctor Deprecator – throw out all the garbage that we no longer need.
Here are a couple of them, just to name a few:
There are lots of libraries that try to emulate LINQ (i.e. the LINQ-to-Collections part). Oracle Certified Streams Developer certifications hanging up our walls.
Don’t get me wrong. This isn’t about LINQ or Streams being better. They’re pretty much the same. But since we now have Streams in the JDK, why worry about LINQ? Besides, the SQLesque syntax for collection querying was misleading anyway.