Much to the delight of the fans of Game of Thrones (GoT) worldwide, the first episode of season 7 premiered last month. During the same month scores of Java fans were awaiting for the release of Java 9, however at this moment it appears to be delayed for couple of months. The advent of “Winter” is supposed to spell doom to the people living in the fantasy world of GoT whereas release of Java 9 is to bring to bring joy and excitement in the java community after a long wait for the improvement in the language.
Being fan of both these worlds and in honour of this month’s season premiere of “The Game of Thrones”, here are some comparisons I’ve made between Java 9 and the GoT.
1. Modularity
Much like the seven kingdoms of GoT who combine forces whenever needed to achieve a greater goal, the new module system in Java works as interconnected modules. The modules can pledge dependency on each other and also expose their services using import and export statements using the metadata. This makes the java runtime lightweight and enables more number of devices to embrace java.
2. Backward Compatibility
GoT show is burdened by choice of bringing dead characters alive, be it due to the character’s popularity or due to lack of viable alternatives. Likewise Java, through various version upgrades, has been carrying these deprecated functions/methods since inception. Often times developers are confused with these carried over features. They would never know if they have to bid them goodbye or continue to use them. Java 9, seems to take a tough stand going forward by introducing a new way of saying deprecated i.e @Deprecated vs @deprecated.
3. Stream API improvement
Long battles made short by using dragons in GoT which makes the most difficult tasks achievable. Historically, Java is blamed for its verbosity and lack of performance. With introductions of Streams and Lambdas in Java 8, the language raised its bar, made long running projects short, competing with the likes of Python, Scala et al. In Java 9, further improvements are made to make stream processing more attractive. The dragons in the latest series got bigger, aren’t they?
written by Srinivas Guthula. Read the full article here.