We have come a long way, dear reader, having dabbled with many Scala features. Hopefully, it was an exciting and fruitful journey. All along, we witnessed a novel approach to the programming process. Scala provides startlingly unconventional ways to help us become more effective. Ultimately, we have witnessed a fundamental change in approach, a paradigm shift.
What we need to do remains mostly the same, though. The idea is to cut down the boilerplate and write code at a higher level of abstraction, for example, the need to pass around bits of code, as a comparator to sort things. We will see how the functional way makes sorting a snappy affair.
Java code is pretty verbose when we compare it with Scala. Functions play an important part in being expressive and succinct.
Error handling has always been a tedious chore. Scala's Try (yes that is a capital T) helps us handle errors in a functional way.
Futures and Promises come after that. These are tools to write...