Madusudanan.B.N
Posted on November 6, 2017
Introduction
Java was initially developed in 1995 and it has come a very long way. Many of you might already have experience with Java, but here is a fun short film to get started.
It was part of a conference, so ignore the promo at the end if you want to.
Java has been a subject of praise, criticism, rants and what not. But recently there has been a very quite a few interesting developments regarding both the language and the JVM ecosystem. I see these changes as a massive turnaround to how Java/JVM was being developed and it could change the future.
Recent updates
1) Moving Java faster
This blog post caught my eye - Moving java forward faster by Mark Reinhold. Mark is the chief architect in the Java Platform Group at Oracle.
Some key takeaways of the blog post.
- JDK release cycles are set to become shorter. Six months for major versions.
- Long term support for major releases. Initial plan is for three years.
- Quarterly update releases.
You might wonder that six months is still quite slow but for a language/platform this massive, it is very impressive if achieved.
I encourage you to read the article in its entirety.
2) Oracle plans to open source its JDK
To the folks who are new to Java or have not programmed in it. There are multiple JDKs that you can use to develop. Oracle JDK, Open JDK and a few other ones. The wikipedia page maintains a list of them.
Until recently, Oracle announced that they will be open sourcing their JDK - https://www.infoq.com/news/2017/10/javaone-opening
This is big news since it was always a confusion among the community on which one to choose. Open JDK is mostly preferred, but there was this conundrum that Oracle JDK had better features and gets updates faster. All that is going to change and in due course of time, Oracle JDK will be merged with Open JDK.
3) Java EE gets a reboot and is donated to Eclipse Foundation
Java EE was in a very poor state, partly because feature updates were very slow and it was largely ignored. Not only that it will be a reboot/change, it also moves to the Eclipse Foundation which is a much better and more open developer community.
4) Java 9 and new enhancements
Java language is in version 9 now. Java 8 brought a lot of features, this version has even more.
Quick feature rundown - http://www.baeldung.com/new-java-9
Official doc from Oracle - https://docs.oracle.com/javase/9/whatsnew/
Java has a REPL now and a lot of cool functional programming features got added such as Closures and Lambda expressions.
5) JVM - Improved GC algorithms
Even though some might disagree that Java is a good choice for a language, the JVM on the other hand is perhaps the most stable cross platform run time as of today. In Java 7, we didn't have much choices regarding GC optimization and tuning. Java 8 brought G1 GC among others. Java 9 made G1GC as default as it was found to be much better than parallel GC for many use cases.
Apart from that, there are two other algorithms that are coming up. One is the ZGC for multi-terabyte heaps and the other is Shenandoah for low pause GC. We might see them sooner since JDK development is set to move faster now.
There is always a good GC algorithm that you can choose depending upon your use case.
6) More interesting projects lined up
There are many interesting projects as part of Open JDK, but two that caught my eye were Project valhalla and Project Amber. They collectively bring in Value types, local variable type inference, improved generics etc .,
This could change the way we use Java and has great impact on other languages in the JVM.
7) JVM languages
Features part of JVM gives a boost to languages that run top of it, since they don't have to do a lot syntactic sugar which means more work for the compiler.
Scala, Kotlin, Clojure , Eta , Groovy are some of the famous languages.
Of these Scala and Kotlin stand out. Some might even think that Kotlin might replace Scala(they are not comparable). More on that below.
Speculation & Opinions
This section I present some of my opinions which could be wrong. Feel free to disagree and discuss in the comments.
On Kotlin's future
Kotlin seems to be a wonderful language from the folks at Jetbrains. It has official support for Android in mobile development, Spring framework has Kotlin support. But the language at its core is more like syntactic sugar over Java. Currently it is much better than Java due to its advanced features, but considering that Java language by itself is coming up with many modern syntax and features, it could catch up. And beyond a point, the differences might be even negligible. This and also there is a lot less Kotlin developers when compared to Java.
This is exactly opposite of what is going on in the industry right now i.e Kotlin is gaining more popularity, but then again it is my opinion.
On choosing a language
Groovy seems to be the least popular. It was a good language but its activity is steadily on the decrease. If you were to choose a language I would consider the below points.
- Java if you are an Object Oriented Programming shop.
- Scala if you prefer Functional Programming(FP) + OOP.
- Eta lang if you prefer purely functional and/or a Haskell enthusiast.
- Clojure if you like dynamically typed FP languages.
- Kotlin if you are into Android and you need something better than Java but not the one that requires a huge learning curve.(This might change as I suggested above)
- Groovy is currently used as a scripting language.
Closing Notes
That's all I have for the updates. I have never been more interested and optimistic about Java and JVM as I am now. There is no better time to be a developer on the JVM platform.
P.S : Do point out any typos or if anything can be improved.
Thanks for reading.
Posted on November 6, 2017
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.