7 ms·
Java is in decline, and there's data to prove it
- nigamanth 4y agoProgramming languages will evolve and grow, it's destined to change. No language can stay on top forever. Java had a good run being one of the fastest rising languages in the late 90s, and it's still not ever yet - some of the biggest applications still use Java to this day. I have a feeling that Kotlin and GoLang are going to be some of the fastest growing languages of this decade, though. It's my new year's resolution to learn Kotlin and GoLang, just incase they explode like Python has.
- speedgoose 4y agoYou can know most of Golang by tomorrow because the language is tiny and doesn’t bring new concepts, except perhaps the channels but you thankfully don’t have to master them.
- jstx1 4y agoIt's in relative decline i.e. it's growing but not as quickly as other languages. It would be surprising if this wasn't the case because you can't expect a 25-year old language with wide enterprise adoption to grow at the same rate as the newer cooler languages. The text of the article acknowledges this of course.
- mmargerum 4y agoC# grew and it's almost as old.
- dmitriid 4y agoJava is 1995 C# is 2000. And Windows-only for a very long time.
- philliphaydon 4y agoAnd C# is growing…
- justoreply 4y agodue to Unity and gaming maybe?
- dmitriid 4y agoAnd microservices. asp.net is quite good for it, it turns out. I now know of several companies developing their backend stuff in C#.
- mmargerum 4y agoI've steered clear of c# my whole career but .net 7 is the bees knees. the minimal API makes it very easy to build endpoints without a bunch of ceremony code.
- invalidname 4y agoPython is older. The article is based on bad data. I'm seeing a lot of growth and rekindled interest in Java thanks to latest innovations such as Loom, GraalVM, Valhalla, etc.
- exabrial 4y agoI really enjoy Java: static typing, near-cpp execution speed, and a very mature set of build tools. …And an emphasis on long term stability. The ecosystem seems to understand this. If you’re building things that will last over a year, use Java.
- nailer 4y agoI think the mentality has changed. We know unmaintained systems fail, so updates are considered part of the cost. That old app that has a bunch of exploits and network stack bugs is probably going to be Java.
- hugi 4y agoYou can write unmaintained applications in any language or stack. An unmaintained system is not the language's fault, it's the maintainer's fault.
- nailer 4y agoSure it’s a culture thing, not a technical thing, but programming languages are technology with their own culture around them. Parent poster was advocating for ’write it and you’re done’ which was the nineties / early 2000s mentality. Because of the time Java was released it’s still common to think this way. Not a slight on Java, there’s things we’ll believe in 2040 that 2023 people won’t quite feel the same way about.
- hugi 4y agoI didn't understand the parent poster as advocating for "write it and you're done". To me "long term stability" and "things that will last over a year" simply mean it excels at creating maintainable software. Sure, the mentality you mention has always existed, regardless of language or environment. But I believe that by it's verbose, static nature, Java's maintainability is a great tool to fight against it.
- 4y ago
- RcouF1uZ4gsC 4y agoI am not sure I believe it. Java is used by massive amounts of developers happily writing enterprise code and then not bothering with what we would consider the programming community. I would guess that upwards of 90% of all the IT outsourcing programmers are using Java and most of them are not taking online surveys.
- shepardrtc 4y agoAfter having worked in SMB's and large enterprise environments, this is accurate. There are many, many Java devs working in companies that don't bother with online communities. They took a Java course and occasionally buy books to update their knowledge. They're at peace with being cogs in the machine.
- traceroute66 4y agoMy view is that Java was a product of its time. Absolutely fabulous for the 90's and 00's, no question whatsoever about that. But today you would be nuts to use Java instead of Go (or Rust if you need the low-level). Go has a solid stdlib. Go can cross-compile and provide single-binary distribution. Go doesn't have and client-side JVM dependency nonsense. Literally just ship the compiled Go binary for your app, everything is "batteries included" for the user. Doesn't matter if you're writing a simple CLI tool or a server. I even don't write shell scripts any more, I write in Go and ship the binaries. It's cleaner and more robust to code and it's easier to deploy because of zero dependencies.
- wernerb 4y agoAs long as there are no cheap go programmers to find you will see java being very relevant.
- AndyPa32 4y agoJava is a bit late to the party, but native binaries are possible for a few years now.
- pulse7 4y agoWith Excelsior JET [1] you could do that since 2000. They closed the company when GraalVM/Native Image started coming out... [1]: https://en.wikipedia.org/wiki/Excelsior_JET https://en.wikipedia.org/wiki/Excelsior_JET
- pasza 4y agoThey were far ahead of the GraalVM - especially with the Swing based GUI applications. The license costed a fortune though...
- Nursie 4y agoIt wasn't exactly fabulous back then - 'Enterprise' java was a quagmire of mediocrity in the 00s. I quite like it now in some ways, its packaging system allows for comparatively rapid development, you can find libraries for a lot of stuff, and it is quite an expressive language. In other ways it's in a sad state - the reflexive use by most projects of quite heavy frameworks that purport to do a lot of work for you and then fail at various edge cases while adding multiple layers of opaque magic and tons of transitive dependencies... it's less than brilliant. And startup times are an issue. Go is nice too. It has some shortcomings in the breadth of its ecosystem, but I'm sure that will grow with time.
- AndyPa32 4y agoI started Java in 1999. And I have heard these type of stories ever since. If Java is dying, then it's a really long process of dying. Java is dying in the sense that Beteigeuze is going supernova. Some day it will happen, but it may not be in my lifetime.
- ksec 4y agoI dont remember a single a Java dying story. It was extremely hyped in the early 00s. There were lots of hate during the very late 00s and early 10s when Ruby on Rails is hyped. But I dont remember anyone saying Java or JVM is dying or dead.
- pulse7 4y agoUff - there were many - and they are again starting to pop up...
- ksec 4y agoA quick search on HN doesn't show much about Java is Dead. And the only Java is dead story I remember was some opinion pieces of how Oracle will make Java unusable. Which hasn't been the case at all. I count those as Oracle hate article rather than Java is dead. There were lots of Java is Dead on Desktop. ( And that is certainly true from a consumer standpoint ). But I dont remember a single Java or the JVM ecosystem is dead article. Comparatively speaking, there are 10 times more Ruby is dead article....
- rwalle 4y ago"decline" and "die" are very different words.
- AndyPa32 4y agoSure. I was just over excited. Sorry :)
- nailer 4y ago
- newaccount2021 4y ago[dead]
- tinus_hn 4y agoI don’t know and don’t care enough to see if it is actually real but it appears as if there is a big licensing problem with Java that makes me not want to touch it with a ten feet pole.
- jbellis 4y agohttps://github.com/openjdk/jdk/blob/master/LICENSE https://github.com/openjdk/jdk/blob/master/LICENSE
- bitcharmer 4y agoAs is typical for these threads on HN, people with the least knowledge and the wrong information are most inclined to comment. Starting from java 17, it's completely free.
- pulse7 4y agoOpenJDK is under GPL+CPE. OracleJDK had "big licensing problem". Almost all are using OpenJDK and moving in this direction.
- tinus_hn 4y agoI’m sure there’s free options, yet if I am a normal user and go to download the JRE, or “download Java”, this is the page I end up on: https://www.java.com/en/download/manual.jsp https://www.java.com/en/download/manual.jsp With the big warning that we should be aware this isn’t free to use with no strings attached, you need a subscription. Again, I believe you when you say it has changed but historically using OpenJDK was the not supported option for a lot of products. That’s just not the kind of software I’m looking for.
- mike_hearn 4y agoThat's Java 8. In that version there were big differences between OpenJDK and the Oracle distribution. Post 8 that's no longer true and normal users aren't meant to download a JRE anymore. You bundle the JVM with the app instead. More stuff got open sourced and OpenJDK based distributions are now what people use.
- iidonkdo 4y agoNetcraft confirms it?
- agumonkey 4y agoMay this data lagging ? Since Oracle has been throwing a lot of updates and willing to make the language a lot more ergonomic it will probably improve stats in the coming years.
- pulse7 4y agoKotlin may be growing on GitHub, BUT Java has the "late-mover advantage": it will incorporate all good ideas from Kotlin & others into the language and it will skip on all failed ideas (like async/await, etc.). So the Kotlin advantage is shrinking - just like it happened with Groovy and others. The Java ecosystem is huge - you have libraries for just anything. And it is similar to Raspberry Pi vs other competitors: RPI has ecosystem, others are much smaller.
- yen223 4y agoCan Java steal top-level functions already?
- pulse7 4y agoJust use static methods for that. Disadvantage: you are forced to use package and class name spaces. Advantage: everything is inside some namespace.
- jrpelkonen 4y agoAgreed. I also find static imports handy to simplify the code at the call site.
- sshine 4y agoJava has historically been good at catching up when competing languages outran it. C# was a better language than Java for some years until Java caught up again.
- deleted 4y ago[deleted]
- orobinson 4y agoI’ve been working almost exclusively with JVM languages for 6 years but have probably written less than 1000 lines of Java in that time. Almost all my work has been in Kotlin and Scala. Given the clear pattern of Java decline and Kotlin growth combined with the near seamless interoperability between Java and Kotlin, I expect Kotlin will slowly but surely take over during the next 10 years.
- pulse7 4y agoThe "added value of Kotlin" is too small to rewrite all those systems from Java to Kotlin. AND: When JVM will introduce new features like value/inlined types - which are not compatible with Kotlin design - there will be problems with Kotlin on JVM... One more reason to stay away from it...
- 4RealFreedom 4y agoWhy would that be incompatible with Kotlin? There are a few ways I can see this working.
- pulse7 4y agoKotlin's data classes can not be mapped to Java's inlined/value classes which will be identity-less. They will need to find workarounds. And the Java's inlined/value classes are not finalized yet so you don't know for sure what can be done until it is finished...
- 4RealFreedom 4y agoKotlin has been adding functionality with no signs of stopping. Saying you won't use a language because there's additional functionality that hasn't been finalized isn't really an argument. I use Kotlin and Java but my goto is Kotlin. It's a pleasure to write in. I have complete faith in JetBrains.
- wiseowise 4y agohttps://kotlinlang.org/docsjvm-records.html https://kotlinlang.org/docsjvm-records.html
- mattbee 4y agoData from _Github_ is making this argument? Java is surely embedded in the kinds of enterprises that would never share a line of code publicly. I can believe Java is "in decline" for new open source projects, but that's not the same thing as being "in decline" among working programmers.
- deleted 4y ago[deleted]
- rwalle 4y agoYes and no. The community activity can affect enterprise use as well. For smaller, new projects that do not depend on existing codebase, companies realize that they can build things using a different language which may bring in faster development speeds, active community support and other benefits. Also, if a smaller portion candidate pool knows Java or masters Java, it forces companies to rethink their direction. (At my company we have a lot of trouble hiring people who want to write new code using some legacy stack) Anecdotally, I know as a matter of fact that companies are moving away from building UI in Java. (I know, this is not the best example.) There used to be a time where people create lots of apps using Java Swing and frameworks based on it. Not anymore -- companies are running away as fast as possible, because things break all the time and hardly anyone is maintaining anything. Guess what they choose instead? The web stack is a favorite.
- mike_hearn 4y agoThe reasons for leaving Swing aren't things breaking all the time or being unmaintained. Swing is maintained by Oracle and JetBrains, for example it recently got a Metal backend. It's been continuously maintained for, what, 20 years now? Compared to the JavaScript framework world, Java UI toolkits are highly stable. Both Android and desktop Java have only had two UI toolkit transitions in their history (Views/Jetpack Compose, Swing/JavaFX respectively), with interop existing in both cases. The issues are elsewhere. For example distribution is/was harder than for a web app, though jlink and Conveyor [1] makes it much easier now than it used to be. [1] https://hydraulic.software/ https://hydraulic.software/ (disclaimer: my company/product)
- pulse7 4y agoMeanwhile JavaScript ecosystem and IDE's became so complicated (Note.js & IDE installation & configuration) that I can say Java is easier in this regard...
- christophilus 4y agoHm. Install VS Code. Install Node. You’re good to go. I personally found JS/TS much easier to ramp up than Java.
- arcturus17 4y agoWhich IDE do you use? The Jetbrains family of products do pretty much everything I ask of them out of the box. Even outside of Webstorm (eg, PyCharm, IDEA) they're all JavaScript-ready because it's so common to develop full-stack. Their batteries-included nature is one of the reasons why I'm willing to pay a premium over VSCode.
- hugofirth 4y agoMan I was frustrated by this article. Despite it being on a subject matter I normally ignore, it lured me in with the promise to “dig into data publicly in a way that (so far) I haven’t seen anyone else do”. I was expecting some novel analysis of in depth data scraped from GitHub APIs, or the results of a qualitative survey of big Java shops, or … something? Instead what we got was a reposting of a few surface level stats pulled from other blog posts which have tolled the death of Java (or C++ or whatever) ad nauseum. It’s as if the author started with a narrative and went searching for the line plots to justify it. To be clear I don’t doubt the growth of Java amongst new learners is slowing down. Partly perhaps due to an image problem relative to other new languages, but likely also due to having somewhat saturated its “total addressable market” and not repositioning itself in new “markets” in the way that, say python has done. But it’s still a great language for many categories of problem (e.g. high throughput live service) and has rich ecosystem. Build what you like with whatever tool is good for the job. Stop using bad stats to motivate your recent learning choices and just go build stuff :-)
- tuxone 4y agoI agree 100%. Each language shines for specific applications and the provided public data adds little value without clusterization per each application type. Plus, GitHub is not representative of the real world. As an example, how much Cobol is versioned there compared to the number of LOC in production today? Also, less new questions on SO may just be a symptom of a mature language instead of a decline. This is an interesting topic that rarely gets addressed objectively.
- ghaff 4y agoGitHub and SO may be relevant directionally for languages that have some material presence on those sites. It's not unreasonable to think there may be a decline though, for a language still at #3 or so, the headline somewhat oversells. But, yes, there are definitely limitations to GitHub and SO data. You'd probably have to do some primary survey research of the audience in question--e.g. large enterprises--to get better numbers for that audience. And, even then, my experience with trying to get some sort of handle on the amount of C code out there years ago was that few people really have a great grasp on lines of code (? an imperfect measure in its own right) of various languages in use in their organizations.
- aceon48 4y agoJava is the reason I dropped my CS major. Python brought me back to programming
- k__ 4y agoSince Python fixed its v2/v3 issue, things seem to go well for it.
- oytis 4y agoI was more interested in the number of software engineers having almost doubled in three years. Did that really happen? Is there any explanation for that?
- arcturus17 4y agoThe hyperexplosive growth of all tech (startups AND enterprise) in the period might be the big explanation. As to what explained that, possibly the chief factor was low interest rates, with other factors being Covid-led digitalization, growin demand for some hot sectors like crypto, fintech, AI, etc.
- mike_hearn 4y agoMeasurement error.
- oytis 4y agoYeah, honestly I was thinking they took two different studies with two different calculation methods and put them alongside.
- ghaff 4y agoKotlin developers. From a fairly small base. RedMonk's programming language rankings have it at #17--just above Ruse and just behind Go. To put things in perspective that ranking still has Java at #3, one spot down from ten years ago (replaced by Python).
- oytis 4y agoNo I mean the total number of developers. I know software is growing, but having doubled since 2019 (and it wasn't small in 2019 either) is beyond reasonable.
- ghaff 4y agoThe doubling of developers quote from the article is specifically Kotlin, which it seems plausible with respect to--even if the overall quoted number seems like a lot. It would represent about 15% of developers worldwide. SlashData, another developer survey platform, published data in 2022 showing that there are now 5 million Kotlin developers worldwide, and that the number of Kotlin developers doubled in one year. I agree doubling of developers overall doesn't make sense. I quick look suggests maybe up to about a 10% increase.
- vb-8448 4y agoWell, probably it's true that java is in decline but i pretty sure it will take the COBOL path: it will take half a century!
- de6u99er 4y agoAgain?
- idoubtit 4y agoI don't care about Java, I don't care much about its decline, but I do care about a good analysis. Unfortunately, I thought this article was quite shallow, despite its claims it is backed by data. First of all, what do these various metrics account for? The article mostly states its about "popularity", without defining it. I suspect the definition vary with the source. And when it's a relative popularity, it should be dealt with care, since a lower rank may be just marginally significative if the competitors are at the same level. Then, what do all those popularity trends in public websites show about the languages trends in companies? The article implicitly suppose they are the same, or at least are related, but that's far from obvious. For instance, a few years ago Python became the de facto language for teaching programmation in many countries, and I suppose that explains its boom in StackOverflow (4% to 16% in 8 years)... but was there the same boom in the professional world? I also think the comparison to Kotlin is very shallow. It's not easy to compare trends between an old and widespread language and a much younger and rare language. In the same way the author claims that Kotlin is on its way to replace Java, I could claim that Python will get replaced by Nim. The data is there: Python's popularity is stagnating, while Nim's had a huge grow. But that would be absurd, since they are not in the same category. Most of all, what does a decline mean? Since the introduction claimed there was a 70% increase in the number of developers over the last 3 years, the usage of Java could increase by 20% while its global share goes down. Would that count as a decline?
- uraura 4y agoDo they count on private repositories? I don't care how many open source todo list projects. I care what languages companies use.
- SquidJack 4y agoAs an android dev i assure the data is real from 2019 most of Java Android app base has been shifted to kotlin because they have good Developer experience with low code more functionality comparing Java, only spring Dev's are now using Java
- christophilus 4y agoFrom afar, modern Java seems like a decent language, and the JVM is truly a marvel. I love the new green threads and native compilation. I just don’t love touching anything associated with litigation-happy Oracle, so I’ll probably continue to observe from afar.
- hjgjhyuhy 4y agoJava still very much rules in enterprise software. At least in my country it’s easily the most employable language simply for that reason.
- lp4vn 4y agoJava is not a perfect language, but for what it proposes to be, a statically typed object-oriented language for building complex systems, it gets 90% right. The platform and the frameworks available for the java ecosystem are unmatched, in my opinion java is a kind of benchmark for the other languages and platforms. At this point it's almost a meme to say that the hyped language of the moment is killing the established players based on normally weak and disputable claims. Anyone who has been around long enough heard this many, many times for all new language in the block. I have no idea if people will be starting new projects in 10 years with kotlin, but I'm sure the will with java.
- deleted 4y ago[deleted]
- Reason077 4y agoJava may not be a fashionable language for new greenfield projects and hot startups now days, but a huge chunk of the world's existing infrastructure runs on it. All that software needs ongoing maintenance, extensions, improvements. So, as a career choice, Java is going to be safe for decades to come. Heck, it's 2023 and there's still plenty of lucrative jobs for COBOL developers. Java will still be a good skill to have in, say, 2050.
- albertopv 4y agoAt my jobs we have millions of java LoC, none on github
- smitty1e 4y agoI was just pulling down some .jar files to run some cloud services locally. Java may be in decline, but its scalability is still why it rules the enterprise roost. Whether that is intrinsic to the language, or a reflection of engineering practices that surround Java is an interesting question.
- cbeach 4y agoAfter a decade working with Java, I moved onto Scala and rekindled my love of coding. Looking back at the verbosity of the language and the horror of Enterprise Java frameworks, I would never go back to Java. Everyone currently coding in Java should look into alternative JVM languages like Scala (or Kotlin, although it’s not as expressive).
- sgammon 4y ago> In 2022, Kotlin (a language seemingly designed to replace Java) Kotlin was not at all designed to replace java, anymore than typescript was designed to replace javascript