Will Java Trend Towards Obscurity?

Ben Halpern on December 12, 2018

I'm forking another conversation: Trevor Montgomery ... [Read Full]
markdown guide
 

I believe that Java, as a platform, will never die. The JVM and its ecosystem of incredibly high-quality libraries, coupled with its deep roots in large-scale enterprise environments, makes it a worthy platform to develop for and will always continue to live on.

However, I do believe Java as a language will be increasingly replaced by Kotlin. Other JVM languages (Scala, Groovy, Clojure) might have tried to replace Java, but they never really delivered on that promise. They all did wildly different things using Java as a backbone, but simply aren't comfortable to devs used to doing things "the Java way". Scala brought pure functional programming. Groovy made it dynamic. But Kotlin is the first that was actually created to just be a better Java, and by-and-large if you're comfortable writing Java8-style code you'll pick up Kotlin very quickly and fall in love.

But a major part of the success of Kotlin is its perfect interop with Java. Kotlin is great because under-the-hood, it is just Java. There is nothing fundamentally different going on with Kotlin than plain-ol' Java. Both Scala and Groovy have their own runtimes which run on the JVM but aren't entirely compatible with Java. Kotlin just compiles to the exact same thing that Java does, which is a huge advantage for incremental migration, especially in large, slow-moving enterprises.

So, again, Java isn't going anywhere. But I do think it's moving the same direction that C has, being the language that underpins all others. And to that point, Javascript is moving in this same direction as well. It is a sign of maturity of the language, that it has gone from being a language used directly, to being part of the fabric for the next level of technology.

 

This is a good summary. I'd add to this that Kotlin actually really strives (to me it seems that way at least) to get out of the JVM's headlock. Kotlin Native (LLVM compiled) seems to point exactly in that direction.

 

I don't think it's trying to get out of the JVM headlock at all. The Jetbrains team is perfectly happy having Kotlin remain a better Java. I think they just saw a great opportunity to increase popularity of Kotlin by making it possible to reuse code across multiple projects using different tech stacks.

In particular, the adoption for Android made it natural to want to use the same code for iOS, and so Kotlin/Native was born. Likewise, using Kotlin on the server made it natural to want to use the same code on Javascript clients, and so we got Kotlin/JS.

But on both cases, I think the branching into other platforms is driven very strongly by its deep ties to the Java platform, and that will continue to be its bread-and-butter.

 

The interop is good, but it’s not perfect. It’s especially bad when reflection is involved (see what happens when you deserialize data class Data(val SomeKey:String) with jackson.)

Other problems revolve around functions named to and in and is being unusable in some situations.

Not to mention that one gremlin dsl class named __!

Kotlin is nice, but IMO the interop is less nice than Clojure’s interop or even the F#/C# interop

 

I think you're spot on with this. The JVM and Java ecosystem are going to around for a LONG time, especially in the enterprise. I doubt we'll see many startups using Java out of the gate, but I can see Kotlin being a nice bridge into JVM-land when you need that kind of power/flexibility.

 

The reason C doesn't die is: it is directly tied to hardware. It was designed such that it doesn't include anything hardware can't do directly. This is why you won't find OOP concepts or Python like functions such as integrate(x^2) in the C standard library. C is not much different from assembly language. It's basically macros of assembly functions. And it will not die, as assembly language will not die. Even today, there are a huge amount of software engineers who develop in assembly, let alone C.

C will die, if and only if, mankind invents a new CPU architecture, that can't be coded the C way. (Quantum computers perhaps?)

Similarly, Java is the C for JVM (the hardware of Java). But, is JVM that irreplacable? I don't know. New attempts are coming up all the time. Android has Dalvik, Dart has its own thing. So, I don't know but, Java could die within our lifetime. Dying means: being used only in legacy platforms, no new development is being made.

I guess it depends how irreplacable JVM is...

Now, would I want Java to die? No. I actually like Java. I enjoy programming in it. I have my own library in it. It's big enough that I don't consider switching to Kotlin. Java is also a good friend of C++ developers. But yeah, it's losing popularity. Which is terrible, because now I have to learn a new language if I want mobile :)

 

I think it depends what you mean by "obscurity."

There are billions of lines of Java out there and while it will almost certainly not be the first choice for new projects 50 years from now, I'm betting that we're still going to be maintaining a lot of that code for the foreseeable future.

 
 

What I see in that graph is Java's temporary upwards trend we had on Stackoverflow due to the massive popularity and impact of Android. When you add the tag "android" to the mix then you get another graph that illustrates the connection:

trend graph

Then came Google's absurd "API copyright" problems with Oracle and the push towards Kotlin (probably mainly to avoid further costly lawsuits and licensing fee extortion, not so much because the language is so pretty). I think the graph is just going "back to normal again". It's not like it's dipping below the point it was in 2009. But who knows what's going to happen next year :-D

Personally I think Java is here to stay and will go through a few more iterations that will make its syntax less verbose, such as the addition of lambda expressions, method references etc.

 

Actually after playing with different keywords I noticed that there is overall a downward trend when it comes to questions about mobile app development in general, here a comparison between android and ios and I also added Java and Objective-C for good measure:

Android vs iOS

I was initially thinking that cross-platform development platforms such as React-Native and Flutter are massively on the rise, but it doesn't seem to be the case to such an extent:

alternatives

But there is a significant trend up for web development questions:

webapp trends

 

I do have to wonder how much of the downward trending of these graphs is actually due to lower interest, or simply the fact that an answer already exists and no longer needs to be asked. Upward trends are definitely indicative of growth, but downward trends...maybe just a mark of maturity and time, not necessarily declining popularity.

Interesting thought... A few more factors that might play a role:

  • Android documentation and tutorials have vastly improved over the past few years
  • Stackoverflow is heavily policed. Duplicates are usually closed. Poor questions deleted. I wonder if these are also taken into account in "Stack Overflow Trends"
  • Some questions don't have tags. It's rare, but a search for "android -[android]" (the word android minus the tag android) comes up with 100K results

So yeah, I guess it makes sense that we have reached something like "Q&A saturation" for Android.

I was also wondering something else along the lines... The graph's Y-axis unit is the percentage of all questions asked per month, and not an absolute amount of questions. I assume the amount of questions asked per month changes over time.

Assuming the active Stackoverflow community was also growing over the past few years, I guess we have overall more questions showing up every month compared to a few years ago where Java and Android were in its prime.

Maybe the actual amount of Java questions per month didn't go down, just the relative amount compared to all questions asked on the platform?

We do have more technologies in the mix that play a bigger role in recent years.

But on the other hand... I'm not a data scientist or analyst. I have no idea what all of that means :-D

So many questions!!! Now I really want to see a data scientist here write an in-depth analysis of this stuff!

 
 

Enterprise gets mentioned a lot when discussing Java, but tied to that also in non-enterprise environments is anyone doing data science.

Python and R might be the working languages of data science, but the landscape is held up by Java.

Think about all the Apache projects (Hadoop, Kafka, Solr, and so many more) -- those are all written in Java. Those aren't going away or being rewritten or replaced any time soon I don't think.

There's a lot more Java out there running amazing things that lots of devs just don't realize and just fall back on "Java is yucky".

Note: I don't program in Java, but I use a lot of things that are.

 

Java is dead. Part #834356234 :)
No it's not dead, nor it should be!
Maybe not as concise (yet! but it will be) but a great, great language.
With pattern matching coming, value classes etc. better-java-s gonna lose!

 
 

This is generally the sober truth, but......

Java's interop must make with other JVM stuff is definitely notable. And the proprietary Oracle concerns (whether valid or not) sure seems like an extra wrench.

 

I would look at the subject also from the geo location perspective. I'm not familiar what the state of Java as a job requirement skill is in North America, but in Europe knowing Java pretty much guaranties you a stable longterm job.

I might be wrong, but I do not see that getting changed anytime soon. Of course, my comment doesn't stand against learning alternative JVM languages, which is what I'm doing at the moment as well.

 

the proprietary Oracle concerns

I think Oracle Legal threw the towel into that ring. Java is only becoming more and more a community owned platform. All commercial features from the original Java distribution have become part OpenJDK which is the default JVM distribution/reference implementation. I think Oracle is going to try to earn money by delivering an alternate Java runtime which is currently named GraalVM. It's open source and free for non-commercial use. It provides a whole bunch of interesting things which companies might be interested in to pay for.

Java as a language is also picking up speed again. Unless JetBrains is going to open Kotlin and make it a community language I think it will eventually lose from new-Java.

If the Oracle/Java debacle showed anything it is that for a single company to try to keep control over a technology can lead to its downfall, or lack of success.

 

Java can both grow in popularity and use while also fading relative to other even more popular languages. It can also become so ubiquitous it's invisible, like C.

It's like how Perl is more popular than ever, but has slid a long way from the once dominant position it used to have in the 1990s.

Maybe Java has already slipped into relative obscurity.

 

It can also become so ubiquitous it's invisible, like C.

Beautifully stated.

 

Please also note the new Java release cadence. In the past, it took 3 years or longer for a major release with new language features. Nowadays, every 6 months a new version is released with new features. So Java will add features from other languages in the next years, e.g. record types, value types and fibers. That will make java as a language more competitive again.

The other side of the coin is: will users (like enterprises) keep up with this pace?

 
 

I agree with Casey, specially the deep roots part. Java, like COBOL, powers a massive amount of software and hardware nowadays. I'm not sure how popular it is for new applications, even more now that Kotlin is in the scene. But here at my job, there are several Java and COBOL applications maintaned and even new programs being created.

I think the "replace" part is due to the fact that startups haven't been using Java for some time now, Rails and the like have chewed the marked and continue to gain popularity.

On the other hand, qualified Java developers, from junior to senior, are a difficult professional to find around here (Brasil).

 

Web Assembly seems like it could live up to all the original JVM goals. That is, being the universal byte-code you can run anywhere. But that's still a few years away? 5-10?
I'd wonder what the patent situation is like. Some of the barriers to that happening could very well be legal.

I don't see JVM-software having the same staying power like some of the compiled stuff. Where the JVM does well is big, monolithic server'y stuff, it doesn't "blend in".

 

It's annoying to me that every now and then someone would bring up the topic of java the platform being stagnant or even dying. While that is just plain ignorance imo, it annoys me even more to hear java THE LANGUAGE is going away, not because it's not true, but because who cares any more? We have closure and kotlin now, dotty and eta are coming. Mind you, meanwhile java the language does evolve slowly like it should so that in 10 years time it won't be bloated like scala or c# or swift is as of now.

 

Don't worry. C/C++ will trend and fade into obscurity, too. I mean, just look at all the micro controllers such as Arduinos and ESP chips that all are entirely based around C/C++ toolchains!!! oh... wait...

 

To put a different spin on this, some traditional Java "patterns" (SynchronizedSingletonFactoryFactoryBuilder, 30 circles of inheritance hell) are trending to obscurity as Java starts getting more functional features like lambdas, better pattern matching (coming soon) and record types. There are upcoming changes in JVM itself for value types, non-erasure of types for generics during run-time which will make JVM even better as a polyglot platform.

 

Hi,

  1. Scala and Clojure were mentioned in comments, but they cannot be replacements for Java in any case. Do you know a good web framework for Clojure? That's a point. Scala is quite limited in its audience. And finally both run on JVM, not vice versa, not Java runs on ScalaVM.
  2. Java would still have a future in teaching, because it is a very good language to teach OOP and algorithms. It is easier than C++ to learn. And there is a lot of academic literature written for Java.

BUT
When I started my programming way, Delphi was incredibly popular, but after Delphi 7, the platform began to decline very fast. But it is still in use, there is a lot of software written in Delphi, that somebody need to maintain and update. And now you can get a good deal if you know Delphi (but on a very high level, not just Hello world). Nobody remembers Borland today; you can use Lazarus - open source replacement.

Maybe Java would come the way of Delphi? Who knows. Actually I don't care too much about it.

 

Just to give some perspective, try adding Ruby or JavaScript to the mix. Surely those aren't actually in decline.

Always keep in mind: lies, damn lies, and statistics ...

 

Ruby is a little bit on decline, at least on StackOverflow: insights.stackoverflow.com/trends?...

In comparison, look at what happens if we add Python insights.stackoverflow.com/trends?...

 

Indeed, and I don't really have the impression that Ruby is already partway fading into non-existence (as the graph somewhat suggests, given the decline and the general low absolute count itself). As to Python, in the graph it has overtaken Java, and completely overshadowed most other languages that I tried. Taking the graph at face-value, it would be reasonable to expect Python to be the only real game in town, but that surely isn't the case.

And that's my point about these kinds of graphs in general. As Inigo Montoya would say (if he were a statistician): I don't think that graph means that you think it means.

I agree :-)

Ruby is alive and well, Python had a surge because of data science, AI and ML, Java is alive and well (maybe less adopted by new Android apps, that's it). All of three are quite old languagues.

It's really really hard to effectively measure "obscurity".

Perl is the perfect example, I haven't heard about it in years, it's not the cool tool everyone is talking about anymore but it's not dead either.

 

I think we'll see some gradual decline in Java being a very popular language, especially among your average college student - and I like to believe that colleges have pushed Java onto students for quite some time now. It was the language I learned in my intro to CS classes but that's not so much the case nowadays, or at least that's what I'm seeing/hearing. Lots of colleges are offering these intro courses in Python or JavaScript now.

As others have said, Kotlin is a likely replacement for Java seeing as it can pretty much do everything Java can, just with less code (correct me if I'm wrong) - web apps, backend stuff, Android apps, etc...

Never forget though!...Java runs on billions of devices, lolol.

 

Obscurity? No, there's no reason to. But will Java increasingly not be the first choice when developing for the JVM? I think so!

 

»In the long run we are all dead«
John Maynard Keynes

 

"Proves to warn that he not busy being born is busy dying." –– Bob Dylan

 

I hope Java language just dies out, I hate the languages, though I like the plataform

 
 

Will Java Trend Towards Obscurity?

I sincerely hope so.

 

I think Java had a viable replacement a long time ago. D is what Java should've been.

code of conduct - report abuse