Apr 302019
 

I’ve been developing in Java since late 2009. It’s a good language, but I’m starting to wonder what kind of future it has. I’ve been using Java 8 since shortly after it came out, even though Java is currently on version 11. Java’s obviously still being developed, so why not move forward? A big part isn’t the infamous module system that launched in Java 9, and broke a lot of stuff. Part of it is the fact that Java is owned and controlled a by a company that seems more interested in rent-seeking off oa Java than doing anything innovative with it.

What got me thinking get about this topic was an article where a member of the Java platform team admitted that Java 9 “…(broke) some things.” The article indicated that there were 2 types of Java developers now, Java 8 developers and Java 11 developers. As someone who’s in the former camp, that’s concerning. Free, official updates for Java 8 ended in January of 2019, so at some point a migration is in order. I’m not going to claim that large Java codebases are going to move from Java to any other language, because that would be stupid. Java 8 code will move to Java 11 (or whatever the current version is at the time). What I’m curious about is whether new projects will choose Java as their programming language or if developers will choose another language instead.

There’s a few things I’m considering as I ponder this hypothesis. The first is that there are already 2 languages that run on the JVM that have a good bit of hype behind them. The first is Scala, which isn’t new, and has already influenced Java – the lambas and Optional class added in Java 8 were originally Scala features. Any Java developers with a functional bent might find Scala tempting. Twitter has been running Scala on their backend for years know, so you’re likely to have little to no trouble finding libraries and tools. The other JVM language that seems to be big these days is Kotlin. I don’t know as much about this language, but it certainly seems to have a lot of active buzz around it.

Given my earlier point that companies with large Java codebases aren’t going to turn around and rewrite them, why should we care if there are JVM-compatible languages out there? First, they’re a natural choice for the aforementioned Java shops to migrate to. Second, even Java shops are going to eventually have new development, and that’s where these languages come in. They’re as close to a drop-in replacement for Java as you can get, which means they’re not going to have to completely re-do their tooling or re-build a set of standard 3rd-party libraries. Once they’re satisfied with new, non-customer-facing Scala or Kotlin code, odds are they’ll just start using those languages for all new code. From that point, it’s only a matter of time until Java is phased out entirely.

So there’s certainly a path away from Java if organizations wanted to start down that road, albeit a slow one. The next question is, “Why would anyone want to?” I think the general pain of going from Java 8 to something currently supported is something people will put up with because of the sunk cost of having Java infrastructure. But that combined with the recent Java license changes may inspire companies to start looking at the options for getting off Java. Yes, OpenJDK gives those companies a way to keep writing commercial Java software without getting screwed by Oracle, but I don’t know if that can be considered anything more than a short-term solution. I’m basing that on the fact that I don’t expect Oracle to keep contributing to OpenJDK indefinitely, particularly if businesses start making that their JDK of choice.

Even acknowledging that the changes in Java 9 were necessary (even if they might have been better handled by a better corporate owner), the licensing changes for Java going forward show that Oracle is more interested in screwing Java shops in search of a quick buck than building and developing the language. Given that most companies that write software prefer not getting screwed by the company that owns the programming language they use, and there’s certainly good motive to leave Java behind.

The real question that matters with predictions like these is what are people actually doing. The answer, according to Github’s 2018 State of the Octoverse report, seems to be “not yet.” Java is holding steady as the #2 most popular languages (behind Javascript). Kotlin, however, is the fastest growing language on Github, so it’s entirely possible we’re looking at the very beginning of a mass abandonment of Java, likely for Kotlin. So while it’s too early to say I’m definitely right, indicators are lining up the way I would expect them to at the beginning of this process.

Even assuming I’m 100% accurate in my predictions here, the process I described will play out over several years. So what does that mean for primarily Java developers like me? For starters, we’re still going to have job security for the foreseeable future. That said, if we want to future-proof ourselves and our careers, it’s time to start brushing up and trying to favor different languages if we can. Kotlin seems like an easy transition and a good place to start. Even if you decide not to stay on the JVM, I still think now’s a good time to diversify your coding repertoire if you’re primarily a Java developer.

 Posted by at 11:45 AM