TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is Java in Decline?

11 点作者 neverminder超过 1 年前
I've noticed that Java fell from 1st to 4th place on Tiobe Language Index which it dominated for like decades, effectively swapping places with Python. It's also a lot more difficult to find jobs with it recently. Is Java in decline? Was it caused by all that Oracle bullshit in recent years?

13 条评论

biglyburrito超过 1 年前
I&#x27;m not sure whether Java is in decline, but it&#x27;s a clunky language that I wasn&#x27;t sorry to leave behind after moving on from my previous job. The only people I&#x27;ve met first-hand who love Java have been using it for years &amp; program primarily in Java.<p>Sure, JDK 21 adds support for some much-needed quality of life features: sequenced collections, records, switch pattern matching, code snippets. But all of these features have been supported for YEARS in other languages that I&#x27;ve enjoyed: C#, Kotlin, Python. Java doesn&#x27;t have anything as slick as LINQ (C#) or list interpretations (Python) for succinct map-reducing objects; Stream API is what you&#x27;re forced to use, and it&#x27;s clunky by comparison.
egor2820超过 1 年前
Yes, I see no new interesting projects for years started in Java. I&#x27;ve been working with Java for a long time. At first it outperformed C++ in ease of development. Large enterprises created software of humongous complexity with that but Docker emerged and Java fell out of favour as it&#x27;s startup slow and it couldn&#x27;t never fullfill low-latency needs with its GC magic. And eventually, it fell in a trap of any long-living tech - it became complex, with snobbish communities, no easy way to adapt to new realities, though it tries but it fails: failed to integrate itself with browsers, failed with computing graphics, failed with scientific libraries, low-latency servers and now it starts to lose ground in general computing. The only argument in its defense is that it&#x27;s widespread - well, yes, but it&#x27;s a miserable argument for a prefessional.
munksbeer超过 1 年前
I develop almost exlusively in Java and as a language it still works extremely well for our use case, and is only improving.<p>We write financial trading systems which require lowish latency (but not truly low latency) with rock solid stability, monitoring, tooling, etc.<p>We actually write idiotmatic Java in the sense we don&#x27;t actually use object pooling etc. We have five 9s latency at below 500 micros. Which people in the industy will know is very much not low latency HFT style, but is enough for our competitive edge. And as I said, we can achieve this while still relying on idiomatic Java, which means we spend most of our time writing feature code rather than fighting the language. And by idiomatic Java I mean the right style for the right part of the code. We mostly write data oriented code, which low touch records&#x2F;pojos and business logic outside of objects, but there are cases where we&#x27;re more traditional OO style.<p>I have ex-colleagues who have moved elsewhere who use non-idiomatic java to achieve &lt; 5 micros fastpath. That was several years ago, they may have improved that into the nanos now.<p>The online programming sub-culture loves to hate Java, because humans love being part of a fashionable in-group, and it is extremely fashionable to hate Java. Luckily, very smart people don&#x27;t care about that nonsense and I get to work with a lot of those people.<p>Summary: I don&#x27;t know if the stats show Java is in decline, but I doubt it. I still get many high salary job pitches from headhunters monthly.
nogridbag超过 1 年前
In my view, Java is still the best choice for building any relatively complex web&#x2F;sass application. For some reason people negatively associate it with &quot;enterprise&quot; software. Enterprise software tends to be very complicated and Java was likely chosen because it is&#x2F;was the best option at the time. And I&#x27;m sure people had bad experiences that they blamed the language for because the problem they were trying to solve was very complex and the leads&#x2F;architects made poor decisions.<p>I&#x27;m using Java with Quarkus for an enterprise app for the past 2 years as the project lead and I couldn&#x27;t be any happier with my decision. We&#x27;re upgrading to Java 21 in a week or two. The code we&#x27;re producing is some of the most boring&#x2F;straightforward code I&#x27;ve seen in a long time. Nearly all of our time is spent solving the business problem and the language never gets in the way. The dev experience is outstanding. With Quarkus we get nearly instant hot reloading. IntelliJ provides industry leading IDE. Oracle keeps releasing major enhancements to usability. Excellent ecosystem, testing frameworks, etc. It&#x27;s hard to find any faults really. Yeah NULL is allowed in the language, but I cannot remember the last time we had a NPE.
jfengel超过 1 年前
The rapid change in Python is an indication that programming is different, rather than Java per se. Python, Java, and C all serve radically different programming niche.<p>The increase in Python tells you that its niche is increasing. It is, among other things, the language of data science and machine learning, which has a huge upswing lately. But that doesn&#x27;t affect the absolute number of Java or C projects or jobs. It just tells you that a new thing is appearing.<p>If there is a chance in Java&#x27;s utility, you see it more in C++ and C#, which occupy more similar niches. It&#x27;s notable that C# is picking up; that&#x27;s a trend that might be worth noting. And it&#x27;s a bit puzzling that Java should fall below C++, and I suspect it has more to do with the vagaries of the metric.<p>But Java is for general-purpose programming, and that niche doesn&#x27;t seem to be going away any time soon. If you want to get into data science, then by all means go learn Python. But that&#x27;s less about picking up a new tool set as a change in careers.
biglyburrito超过 1 年前
For anyone else who is curious, here are the Tiobe Language Index rankings for October 2023 ( <a href="https:&#x2F;&#x2F;www.tiobe.com&#x2F;tiobe-index&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.tiobe.com&#x2F;tiobe-index&#x2F;</a> ):<p>#01 Python #02 C #03 C++ #04 Java #05 C# #06 JavaScript #07 Visual Basic #08 PHP #09 SQL #10 Assembly Language<p>IMO the fact that Visual Basic is in the Tiobe Top 10 at all is kinda sus, so it&#x27;s probably worth also taking a look at the Stack Overflow 2023 Developer Survey results ( <a href="https:&#x2F;&#x2F;survey.stackoverflow.co&#x2F;2023&#x2F;#professional-developers" rel="nofollow noreferrer">https:&#x2F;&#x2F;survey.stackoverflow.co&#x2F;2023&#x2F;#professional-developer...</a> ):<p>#01 JavaScript #02 HTML&#x2F;CSS #03 Python #04 SQL #05 TypeScript #06 Bash&#x2F;Shell (all shells) #07 Java #08 C# #09 C++ #10 C
silicaroach超过 1 年前
Oracle stuff didn&#x27;t help. It&#x27;s initial appeal was that it ran everywhere. Now all languages do. So people who just want to code something quickly w&#x2F;o worries for security, etc. use Js&#x2F;Node for web stuff and Python for pretty much everything else. For people really concerned about speed and security C&#x2F;C++ is the &#x27;real&#x27; programmer&#x27;s tool of choice. Java code gets very ugly, very quickly and code reuse, one of the big promises, just never took off. So Java is kind of purposeless. Pick a task and there is something better and easier to use than Java.
ale_jacques超过 1 年前
I gotta disagree with thesuperbigfrog in some aspects. In the corporate world, Java is still very much alive. Not just on legacy software, but there is a lot of new software being developed in Java. Specially with the advent of the cloud native frameworks like Quarkus and Micronaut.<p>Indeed it&#x27;s not fancy as &quot;new&quot; techs like Go or Rust and I agree it&#x27;s ckuncky and verbose, but there are plenty new features and applications for modern Java.
thesuperbigfrog超过 1 年前
&gt;&gt; Is Java in decline?<p>Yes.<p>Take a look at the graph: <a href="https:&#x2F;&#x2F;www.tiobe.com&#x2F;tiobe-index&#x2F;java&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.tiobe.com&#x2F;tiobe-index&#x2F;java&#x2F;</a><p>Java&#x27;s original strengths were:<p>1) &quot;write once, run anywhere&quot;: a huge improvement over the platform-dependent C &#x2F; C++ that was widely used at the time,<p>2) easier to learn and safe replacement over C++ for many problem domains: finding &#x2F; growing good C++ talent has always been a challenge<p>3) large, powerful standard library and massive third-party ecosystem: it made development rapid and much more like building with Legos than rolling your own libraries like many C &#x2F; C++ shops did<p>Java&#x27;s killer use case became backend and middle-tier enterprise software.<p>Today Java&#x27;s strengths are less relevant:<p>1) You can &quot;write once, run anywhere&quot; with containers, Go (easier deployments over Java, lower resource usage compared to Java, easier to learn than Java), or Rust (easier deployments over Java, far lower resource usage compared to Java, harder to learn than Java, more performant than Java).<p>2) Java never fully displaced C++ for high-performance domains. Go and Rust are solid competitors to both Java and C++ depending on the problem domain.<p>3) Go and Rust both have wide adoption and third-party ecosystems that compete against Java&#x27;s ecosystem.<p>I say this as someone who wrote Java enterprise software for many years. I don&#x27;t hate Java. It has been very useful and paid my bills for years.<p>Java is not going away. There is FAR too much software written in Java and enterprises will keep on maintaining legacy software until they choose not to. Java 8 will probably go on for decades as long as someone keeps patching it and selling support. Java will slowly become another COBOL.<p>&gt;&gt; Was it caused by all that Oracle bullshit in recent years?<p>Partially.<p>Breaking changes in how the JDK &#x2F; JRE worked between Java 8 and Java 9 were a contributing factor.<p>Oracle&#x27;s licensing changes caused many enterprises to flee to alternative OpenJDK distributions, effectively causing some mindset fragmentation and encouraged enterprises and developers to look at alternatives.
DamonHD超过 1 年前
There are alternatives such as Rust for some of the error-elimination cases that Java was covering.<p>I&#x27;m still using Java and improvements in it continue, and like COBOL it won&#x27;t die completely, but there is a good argument for looking elsewhere for new projects especially long-lived infrastructure.
sysadm1n超过 1 年前
<p><pre><code> NoItIsNotInDeclineDueToItBeingAbleToBeWrittenOnceAndBeingAbleToRunEverywhere</code></pre>
xch超过 1 年前
Decline? IT runs on java 8 with trillions of code
mdtrooper超过 1 年前
I hope it.